Number Format clashing with standard built-in format #506
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#506
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
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:
However number format 1 is a no-decimal number. The standard number formats are listed in the
table_fmt
variable. The tool should be writing to the custom number format ranges: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.