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

Bug in shared formulas: non-fixed cells are not updated #2354

Merged
merged 3 commits into from
Nov 4, 2021

Conversation

zaitcev-ivan
Copy link
Contributor

@zaitcev-ivan zaitcev-ivan commented Oct 25, 2021

This is:

- [x] a bugfix
- [ ] a new feature

Checklist:

Why this change is needed?

Bug in shared formulas: Non-fixed cells are not updated if the formula has a fixed cell.
Example: right shift shared formula: IF(A$1=0,0,A1/A$1)
Expected value: IF(B$1=0,0,B1/B$1)
Actual value: IF(B$1=0,0,A1/B$1)

Similar behavior is observed when copying formulas vertically.
This issue occurs because a fixed and a non-fixed cell hit the same element of the $newCellTokens array by index $cellIndex

…a has a fixed cell

Example: right shift shared formula: IF(A$1=0,0,A1/A$1)
Expected value: IF(B$1=0,0,B1/B$1)
Actual value: IF(B$1=0,0,A1/B$1)

Similar behavior is observed when copying formulas vertically.
This issue occurs because a fixed and a non-fixed cell hit the same element of the $newCellTokens array by index $cellIndex
@zaitcev-ivan zaitcev-ivan changed the title Bug in shared formulas: non-fixed cells are not updated if the formulas Bug in shared formulas: non-fixed cells are not updated Oct 25, 2021
@oleibman oleibman merged commit 89edc5b into PHPOffice:master Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants