Skip to content

Fix potential bug with array formula loading not setting all shared strings #2609

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sbeca
Copy link
Contributor

@sbeca sbeca commented Feb 2, 2025

While looking through the ClosedXML source code to understand how array formulas work, I came across this bit of code that looked not quite right. It looks like when loading a workbook, array formula loading iterates through all the cells referenced by the array formula to set the shared strings, but instead of setting it for each cell, it currently appears to just set the master cell over and over again.

It looks like this change happened in commit e49fef9 when setting formulas was changed to using slices, but maybe a copy-paste mistake missed a required cell address change.

I am definitely not yet familiar with how array formulas work under the hood though, so I might be off base here. Iterating but not changing the call just looked suss to me

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