Fix the return value from dateToExcel() when it's passed a non-numeric value.#2956
Open
davepuchyr wants to merge 1 commit intoexceljs:masterfrom
Open
Fix the return value from dateToExcel() when it's passed a non-numeric value.#2956davepuchyr wants to merge 1 commit intoexceljs:masterfrom
davepuchyr wants to merge 1 commit intoexceljs:masterfrom
Conversation
privatecoder
added a commit
to privatecoder/exceljs
that referenced
this pull request
Sep 24, 2025
3 tasks
protobi-pieter
added a commit
to protobi/exceljs
that referenced
this pull request
Nov 7, 2025
Adopts 5 low-complexity bug fixes from upstream exceljs/exceljs to improve robustness and fix data corruption issues. Changes: 1. exceljs#2851 - Fix boolean XML attribute parsing (Issue #18) - lib/xlsx/xform/simple/boolean-xform.js - Correctly handles <strike val="0"/> and other boolean attributes - Respects val attribute instead of always returning true 2. exceljs#2956 - Fix excelToDate() for non-numeric values (Issue #19) - lib/utils/utils.js - Prevents "Invalid Date" errors when cell has date format but non-numeric value - Eliminates Excel warnings on file open 3. exceljs#2973 - Fix dynamicFilter parsing in tables (Issue #20) - lib/xlsx/xform/table/filter-column-xform.js - Prevents exception when loading files with dynamic table filters - Ignores unsupported dynamicFilter nodes gracefully 4. exceljs#2915 - Fix WorkbookReader sharedString resolution (Issue #21) - lib/stream/xlsx/workbook-reader.js - Fixes data corruption where sharedString indices shown instead of actual values - Corrects stream piping for proper sharedString resolution 5. exceljs#2978 - Fix undefined column autofilter assignment (Issue #22) - lib/xlsx/xform/table/table-xform.js - Prevents crashes when autofilter references non-existent columns - Adds guard clause for missing column indices All changes are low-risk, single-file modifications that fix real user-reported bugs. Upstream PRs: - exceljs#2851 - exceljs#2956 - exceljs#2973 - exceljs#2915 - exceljs#2978 Tests: All existing tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Co-Authored-By: Jason233Wang <[email protected]> Co-Authored-By: davepuchyr <[email protected]> Co-Authored-By: Johnny Oshika <[email protected]> Co-Authored-By: Anecha Kuekharem <[email protected]> Co-Authored-By: Niels Abildgaard <[email protected]>
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.
If a non-numeric value is passed to dateToExcel(), like when it's called because the cell style is a date format, the result is "Invalid Date", which gets converted to NaN when the sheet is persisted, which causes Excel to pop-up extremely annoying warnings the next time that the sheet is opened. This 1-liner fixes that.