Skip to content

Commit ea80003

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: OpenXML.Excel.File.get_Cell ( Fixes #6 )
Handling text cells
1 parent 37281b8 commit ea80003

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

OpenXML.types.ps1xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,16 @@ foreach ($worksheet in $worksheetsInOrder) {
210210
$excelCells = [Ordered]@{
211211

212212
}
213+
$sharedStrings = $this.OpenXML.Parts['/xl/sharedStrings.xml'].Content
213214
foreach ($worksheetRow in $this.content.worksheet.sheetdata.row) {
214215
foreach ($worksheetColumn in $worksheetRow.c) {
215-
$excelCells[$worksheetColumn.r] = $worksheetColumn.v
216+
217+
$excelCells[$worksheetColumn.r] =
218+
if ($worksheetColumn.t -eq 's') {
219+
$this.OpenXML.SharedStrings[$worksheetColumn.v -as [int]]
220+
} else {
221+
$worksheetColumn.v
222+
}
216223
}
217224
}
218225
$excelCells

0 commit comments

Comments
 (0)