-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Number Format with "cellText: false, cellDates: true" broken #2349
Comments
ECMA-376 (XLSX) does not specify a default for code 30, hence nothing is in the SSFImplicit table. It further states:
There are some locale-specific overrides for that particular code:
XLSB (2.5.76 Ifmt) refers to XLSX XLS (2.4.126 Format) is even stranger, not prescribing a default for 30 and stating
Out of curiosity, can you repeat that process and save the file in a few different formats, namely "Excel 97-2003 Workbook (.xls)" and "SYLK (Symbolic Link) (.slk)"? |
For *.xls, Line 92 in 3542d62
For *.slk, the behavior is opposite to *.xls. |
Certainly, ECMA-376 not includes code 30, number format to string should be implementation-defined. |
We'd have to test across a few more locales. If Excel is always treating format code 30 as the default date format, we can just add it to SSFImplicit. Can you share the SLK file? You may need to compress as ZIP and attach. |
😉Request for an extra help, I want to know which custom format code should be recognized as |
|
Thanks! The function is a stripped down version of the tokenizer https://github.com/SheetJS/ssf/blob/master/bits/81_fmttype.js#L3 It looks for the following date tokens:
|
Can you check what version of the library you are using (
With
|
My options:
Addtional: I'm using |
Ok finally i find cellText: true
cellText: false
Line 27 in 333deae
Lines 93 to 94 in 333deae
|
File
sheetjs-bug.xlsx
Problem
Date
column is standard date format,Custom Date
column is custom formatwhen
XLSX.read
setcellDates: true
sheetjs/bits/67_wsxml.js
Line 453 in 3542d62
fmtid
is30
, andSSF.is_date
gotundefined
so brokenDiscussion
SSF.is_date
validate input and returnfalse
for unexpected input.safe_is_date
likesafe_format
withSSFImplicit
table, and add more implicit format.workbook.Sheets
still includes the broken worksheet, just remove the broken cell.The text was updated successfully, but these errors were encountered: