Skip to content

Support formulas in defined names#195

Open
timo92 wants to merge 2 commits intooptilude:masterfrom
timo92:fix-defined-names
Open

Support formulas in defined names#195
timo92 wants to merge 2 commits intooptilude:masterfrom
timo92:fix-defined-names

Conversation

@timo92
Copy link

@timo92 timo92 commented Aug 9, 2024

Excel supports naming a formula via its Name Manager. The current version of this library only supports adjusting defined names that name a cell. Also it adjusts all names not the ones that require adjustments.

For example:

  • Table1!A3 is changed to Table1!A4 even if the row is inserted in Table2
  • some_table[col_name]*IF(Table1!$D$6="",1,(Table!$D$6/Table!$D$5)) is changed to some_table[col_name]*IF(Table1!$D$6="",1,(Table!$D$6/Table!$D$7 even though the change occurred in Table2 and the resulting name causes an error when opening excel

This PR adds support for Formulas in defined names such that the above examples are adjusted as expected

I have adjusted the test case for named tables to contain two sheets and a formula
I have adjusted the test case for the pageBreakOption to actually change the size of the page and ajdusted the code to update the pageBreak. Maybe @jdugh can comment if this still supports his use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant