Summary
Adopt upstream PR exceljs#2973 to fix parsing error when loading Excel files with dynamic filters in tables.
Currently, ExcelJS throws "Unexpected xml node in parseOpen" exception when encountering <dynamicFilter> nodes in table definitions. This fix prevents the exception by ignoring these unsupported nodes during parsing.
Upstream PR
Changes
File modified:
lib/xlsx/xform/table/filter-column-xform.js - Handle dynamicFilter nodes (3 lines)
Total: 3 additions, 0 deletions
Bug Description
When reading Excel files that contain tables with dynamic filters (e.g., date filters, top 10 filters), ExcelJS throws an exception and fails to load the file.
Current behavior:
- Throws "Unexpected xml node in parseOpen" when encountering
<dynamicFilter> nodes
- Fails to load Excel files with dynamic table filters
Fixed behavior:
- Silently ignores
<dynamicFilter> nodes during parsing
- Successfully loads Excel files with dynamic filters
- No attempt to preserve or recreate dynamic filters (just prevents crashes)
Value Proposition
- Low Risk - Simple 3-line addition to handle unsupported node type
- Bug Fix - Prevents crashes when reading certain Excel files
- Robustness - Improves compatibility with Excel files created by other tools
Testing Plan
Implementation Notes
This PR doesn't add full dynamic filter support - it only prevents the exception. Dynamic filters will be ignored when reading and won't be preserved when writing.
Summary
Adopt upstream PR exceljs#2973 to fix parsing error when loading Excel files with dynamic filters in tables.
Currently, ExcelJS throws "Unexpected xml node in parseOpen" exception when encountering
<dynamicFilter>nodes in table definitions. This fix prevents the exception by ignoring these unsupported nodes during parsing.Upstream PR
Changes
File modified:
lib/xlsx/xform/table/filter-column-xform.js- Handle dynamicFilter nodes (3 lines)Total: 3 additions, 0 deletions
Bug Description
When reading Excel files that contain tables with dynamic filters (e.g., date filters, top 10 filters), ExcelJS throws an exception and fails to load the file.
Current behavior:
<dynamicFilter>nodesFixed behavior:
<dynamicFilter>nodes during parsingValue Proposition
Testing Plan
Implementation Notes
This PR doesn't add full dynamic filter support - it only prevents the exception. Dynamic filters will be ignored when reading and won't be preserved when writing.