Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support formulas in defined names #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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