Repository navigation
XLSX: cache #SPILL! and #CALC! as #VALUE! so Excel can open the file - #85
Merged
h-a-n-a-s-h-i merged 2 commits intoOct 10, 2026
Merged
Conversation
They are not error codes of the file format, and Excel refuses to open a
file whose cached values contain them ("Parameter error"). Any workbook
with a blocked spill could not be opened in Excel. Excel caches these
errors as #VALUE! itself.
nihilist-narwhal
force-pushed
the
xlsx-spill-cached-errors
branch
from
October 9, 2026 22:30
1d1bd4c to
311b1a5
Compare
Member
|
Merged into If you haven't already, please come join us on Discord: https://discord.gg/artcraft — we'd love to have you around. |
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.
A formula whose value is
#SPILL!(a blocked spill) or#CALC!is written with that error as its cached value. Neither is an error code of the XLSX file format, and Excel refuses to open such a file: on Excel for Mac 16.113, opening it fails with "Parameter error (-50)". So any workbook containing a blocked spill could not be opened in Excel.Excel itself caches these errors as
#VALUE!when it saves, so the writer now does the same.#SPILL!/#CALC!inside a cached array value are mapped too. Other errors (#N/A,#DIV/0!…) are unchanged, and GridCraft still shows the real error in its own UI, since it recalculates on open.spill_and_calc_errors_are_cached_as_value_errorsfails before the change and passes after it. The 42gridcraft-xlsxtests pass, and fmt passes.cargo clippy -p gridcraft-xlsx --all-targets -D warningsis clean apart from the existingmanual_range_containsatcrates/core/src/date.rs:100, which this PR doesn't touch.cm), so Excel applies implicit intersection:SUM(A1:A20*B1:B20)becomes#VALUE!#64 and Preserve array evaluation for non-spilling XLSX formulas #83 (dynamic-array metadata); it applies on its own.The second commit adds my entry to
contributors/people.toml.