-
-
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
Number Format clashing with standard built-in format #506
Comments
Hello, Thank you for the fix. Though there are some issues still pending. Even though the excel is parsing now, its unable to parse the date fields correctly. Example, the date is parsed like a number "40909" instead of "3/31/2012" |
@asksahil It looks like this file is attempting to override the standard number formats. It is attempting to set number format 1 to a date: <numFmts>
<numFmt numFmtId="0" formatCode="General"/>
<numFmt numFmtId="1" formatCode="MM/dd/yyyy"/>
<numFmt numFmtId="2" formatCode="$#,##0.00"/>
</numFmts> However number format 1 is a no-decimal number. The standard number formats are listed in the
https://github.com/SheetJS/js-xlsx/blob/master/bits/47_styxml.js#L225 Either way, since Excel isn't raising any issues with that, it's worth changing the assumption. |
- decode sheet name for XLSX and XLML (fixes SheetJS#203 h/t @rocketmonkeys) - XFExt (fixes SheetJS#298 h/t @aetna-softwares @aimcom @baharudinafif) - handle truly empty `<is>` elements (fixes SheetJS#506 h/t @asksahil) - pin version numbers for dependencies (fixes SheetJS#469 h/t @nhtera) - sed usage fix (see SheetJS#572 h/t @Liryna) - fix hex2RGB substr indices (fixes SheetJS#294 h/t @kamorahul) - removed stale typescript files (see SheetJS#442) - reworked shift formula regex (fixed SheetJS#551 h/t @SheetJSDev) - README note on webpack codepage suppression (fixes SheetJS#438 h/t @rusty1s) - README note on WTF (fixes SheetJS#487 h/t @livesoftware)
- recalculate SSF for malformed files (fixes SheetJS#506 h/t @asksahil) - malformed shared string (fixes SheetJS#445 h/t @ramzec) - SSF added to TS def (fixes SheetJS#711 h/t @duckywang1) - Norsk property names - resolved gitbook processing issues
Hi,
I have an excel file which I am trying to parse using sheetjs xlsx.js plugin.
Attached is the excel file.
Financial Data All Metrics 161121.xlsx
Below is the code which I am using to get the sheetname and worksheet objects.
Even though the sheet name firstSheetName is retrieved successfully, the worksheet object comes out as null.
reader.onload = function(e,f) {
var data = e.target.result;
var workbook
workbook = XLSX.read(data, {type : 'binary'});
var firstSheetName = workbook.SheetNames[0]
var worksheet = workbook.Sheets[firstSheetName]
};
I have tried to parse the file at http://oss.sheetjs.com/js-xlsx/ but there too it did not work.
The text was updated successfully, but these errors were encountered: