-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix issue when pulling from cells with some types of formulas is them #23
Fix issue when pulling from cells with some types of formulas is them #23
Conversation
@BHoMBot check compliance |
…accessing value of cLCell
Co-authored-by: Fraser Greenroyd <[email protected]>
513c578
to
08b75ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing against today's alpha using the test script provided shows these two errors on the canvas:
After rebasing this PR and compiling this toolkit, the errors change to warnings:
Same for both pulls.
This did pull through values whereas the alpha did not, so this PR represents an improvement to the overall workflow. I'm happy for this to be merged and deployed for further testing via alphas.
@FraserGreenroyd to confirm, the following actions are now queued:
|
The check |
The check |
@BHoMBot check ready-to-merge |
@FraserGreenroyd to confirm, the following actions are now queued:
|
Issues addressed by this PR
Closes #22
As stated in the issue, there are some issues with reading values from some cells that contain some types of formulas.
The code in this PR fixes the issue by falling back to the cached value of the cell for when getting the Value out fails.
I went with raising a warning if this happens, and if closedXML believes the cell needs recalculation. For all cases I have tested so far, the cached value will be correct, but raised the warning to be safe.
Saying that, I was not aware that the adapter actually recomputed the sheet to get the values. Would have assumed that it just got whatever was in the cell, so might be safe to remove the warning.
Happy for any input on this from reviewers.
Test files
https://burohappold.sharepoint.com/:f:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/Excel_Toolkit/%2323-FixIssueReadingSheetsWithSomeTypesOfForumlas?csf=1&web=1&e=7dFRFj
Changelog
Additional comments