Skip to content

Commit 1ea7349

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: OpenXML.Excel.File.get_Formula ( Fixes #26 )
1 parent 381125d commit 1ea7349

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

OpenXML.types.ps1xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,20 @@ foreach ($worksheetRow in $this.content.worksheet.sheetdata.row) {
237237
return $excelCells
238238
</GetScriptBlock>
239239
</ScriptProperty>
240+
<ScriptProperty>
241+
<Name>Formula</Name>
242+
<GetScriptBlock>
243+
$formulaCells = [Ordered]@{}
244+
foreach ($worksheetRow in $this.content.worksheet.sheetdata.row) {
245+
foreach ($worksheetColumn in $worksheetRow.c) {
246+
if ($worksheetColumn.f) {
247+
$formulaCells[$worksheetColumn.r] = $worksheetColumn.f
248+
}
249+
}
250+
}
251+
$formulaCells
252+
</GetScriptBlock>
253+
</ScriptProperty>
240254
</Members>
241255
</Type>
242256
<Type>

0 commit comments

Comments
 (0)