Custom Number Format with "cellText: false, cellDates: true" broken
See original GitHub issueFile
Problem
Date
column is standard date format, Custom Date
column is custom format
when XLSX.read
set cellDates: true
https://github.com/SheetJS/sheetjs/blob/3542d62fffc155dd505a23230ba182c4402a0e2c/bits/67_wsxml.js#L453
fmtid
is 30
, and SSF.is_date
got undefined
so broken
Discussion
SSF.is_date
validate input and returnfalse
for unexpected input.- use
safe_is_date
likesafe_format
withSSFImplicit
table, and add more implicit format. - not broken whole worksheet, because
workbook.Sheets
still includes the broken worksheet, just remove the broken cell.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Format date with SheetJS - javascript - Stack Overflow
I am trying to use SheetJS to read a .xlsx file but am having some trouble with a column of dates that is...
Read more >7 Amazing Excel Custom Number Format Tricks (you Must ...
Using Excel Custom Number Formatting, you can display the data in the desired format. Here are six Excel Custom Number Format tricks for...
Read more >xlsx - npm
The parser covers a wide gamut of common spreadsheet file formats to ensure that "HTML-saved-as-XLS" files work as well as actual XLS or...
Read more >JS-XLSX Core Test Runner - SheetJS
should not generate number formats by default43ms ‣ ... should generate date cells if cellDates is true350ms ‣ ... should preserve custom properties ......
Read more >XLSX avoid large numbers from converting to exponential with ...
In my xlsx sheet there is a date and number in sheet I am facing issue when I ... { type: "binary", cellText:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok finally i find
cellText: false
will cause this error.cellText: true
cellText: false
https://github.com/SheetJS/sheetjs/blob/333deae63fbe13d1ff2db42e599211a062001c32/bits/11_ssfutils.js#L27
https://github.com/SheetJS/sheetjs/blob/333deae63fbe13d1ff2db42e599211a062001c32/bits/66_wscommon.js#L93-L94
SSFImplicit
already includesfmt30
, but whencellText: false
, it won’t be used.My options:
Addtional: I’m using
xlsx
inWorker
.