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.
Integer cell values are interpreted as Dates based on
cellXfs.xf
elements inxl/styles.xml
. However, when any spreadsheet has "protected" cells, thesexf
elements can have the form:Currently, unknown child elements of
xf
elements are not handled correctly and this causesxl/styles.xml
to be parsed incorrectly (this is the root of the problem). Whenxl/styles.xml
is parsed incorrectly, thelib/xlsx/style/styles-xform.js
methodgetStyleModel
can fail to find thenumFmt
for Date types. The change here does not have to be "the fix" (you/we can also add an xform for protected elements) but it does fix the problem since unknown child cells ofxf
elements will not cause the parentListXform.parseClose
to remove theparser
.Since exceljs may not be able to account for all possible element types in the xml files, it should at least ignore unknown elements and only process those that it knows how to "handle." This way exceljs will do its best to work correctly for the subset of features it supports.
Let me know if more info is needed.