HF-270: Exporter honours evaluateNullToZero for bare empty cells - #1738
Open
marcin-kordas-hoc wants to merge 2 commits into
Open
HF-270: Exporter honours evaluateNullToZero for bare empty cells#1738marcin-kordas-hoc wants to merge 2 commits into
marcin-kordas-hoc wants to merge 2 commits into
Conversation
With evaluateNullToZero: true the interpreter already coerced empty -> 0 inside formulas, but the Exporter returned null for a bare empty cell read directly - getSheetValues over [[null, '=A1']] gave [[null, 0]]. The EmptyValue branch now returns 0 when the flag is on; default behaviour is byte-identical, ISBLANK still reports true. CHANGELOG names the caveat: code using null to distinguish truly-empty under this flag needs ISBLANK. Implemented by a prep-ship lane (task HF-270), loop green after 1 iteration; verified: authored specs 22/22, eslint clean, tsc clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdHPZAjciZFWqGa19Yf7it
Contributor
|
Task linked: HF-270 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | b1c3f34 | Commit Preview URL Branch Preview URL |
Aug 31 2026, 05:19 AM |
Performance comparison of head (b1c3f34) vs base (114fd5d) |
marcin-kordas-hoc
marked this pull request as ready for review
August 18, 2026 05:48
Collaborator
Author
|
Paired tests PR: handsontable/hyperformula-tests#39 — merge it BEFORE this one. |
# Conflicts: # CHANGELOG.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1738 +/- ##
===========================================
+ Coverage 97.32% 97.33% +0.01%
===========================================
Files 195 195
Lines 15739 15739
Branches 3390 3391 +1
===========================================
+ Hits 15318 15320 +2
+ Misses 421 419 -2
🚀 New features to boost your workflow:
|
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.
Fixes HF-270: the
evaluateNullToZeroconfig option is honoured by the interpreter (a formula reading an empty cell already coerces empty → 0) but was ignored by the Exporter, which always returnednullfor a bare empty cell read directly — so with the flag on,getSheetValuesover[[null, '=A1']]gave[[null, 0]].What changed
The Exporter's
EmptyValuebranch returns0whenconfig.evaluateNullToZerois true,nullotherwise. Default behaviour (flag off/absent) is byte-identical.ISBLANKstill reportstruefor the bare empty cell either way. The CHANGELOG entry names the caveat: code relying onnullfromgetCellValueto distinguish truly-empty from computed-zero under this flag should useISBLANKinstead.Implemented independently from the task description (not taken from the fork referenced there).
Verification
Paired tests:
hyperformula-tests@spike/hf270-null-to-zero(22 assertions acrossgetCellValue/getSheetValues/ExportedCellChange/ ISBLANK / default-off).tsc --noEmitclean,eslint --quietclean.🤖 Generated with Claude Code
Note
Medium Risk
Changes observable API output for consumers with
evaluateNullToZero: true; default-off behavior is unchanged but callers relying onnullfor empty cells may need to adjust.Overview
Aligns exported cell values with formula evaluation when
evaluateNullToZerois enabled: bare empty cells now surface as0through the export layer instead of alwaysnull.Exporter.exportValuechecksconfig.evaluateNullToZeroonEmptyValueand returns0ornullaccordingly, sogetCellValue, sheet value getters, andExportedCellChangematch the interpreter’s empty→zero behavior. With the flag off, behavior is unchanged. Integrators who usednullfromgetCellValueto distinguish empty from zero under this flag should useISBLANKinstead.Reviewed by Cursor Bugbot for commit b1c3f34. Bugbot is set up for automated code reviews on this repo. Configure here.