fix: clear shared formula when overwriting with a normal formula (#2337) - #2338
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2338 +/- ##
==========================================
- Coverage 99.60% 99.59% -0.02%
==========================================
Files 32 32
Lines 26864 26862 -2
==========================================
- Hits 26758 26753 -5
- Misses 55 57 +2
- Partials 51 52 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closed
2 tasks
xuri
approved these changes
Jun 11, 2026
xuri
left a comment
Member
There was a problem hiding this comment.
Thanks for your contribution. I've made some changes based on your branch.
Closed
2 tasks
xuri
added a commit
that referenced
this pull request
Jun 15, 2026
- Remove dead code for resolve indirect code coverage decrease caused by #2338
xuri
added a commit
that referenced
this pull request
Jun 16, 2026
…ivot table data fields - Add new exported PivotTableShowValueAs data type - Add new exported PivotTableShowValueAsType enumeration - Add new exported 3 error variables ErrPivotTableShowValueAsBaseField, ErrPivotTableShowValueAsBaseItem and ErrUnsupportedPivotTableShowValueAsType - Add new field ShowValueAs in the PivotTableField data type - Check reference before set shared formula to prevent generate corrupted workbook, related with #2338 - Idempotency setting and reading of the Subtotal data field in a PivotTable - Update unit tests
Member
|
Follow up, note that this changes will cause generate corrupted workbook TestSetCellFormula5.xlsx. I fixed it in commit 4ae56a6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Details
Make SetCellFormula overwrite existing shared formula
Description
When SetCellFormula overwrites a cell that belongs to a shared formula range, it updated only c.F.Content but left c.F.T, c.F.Si, and c.F.Ref intact. As a result, GetCellFormula still resolved via the shared formula and returned the same formula for every cell in the range.
Related Issue
#2337
Motivation and Context
Fix silent wrong data when writing individual formulas over a shared formula range.
How Has This Been Tested
Added unit test
Types of changes
Checklist