Wrong number parsing #909
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#909
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?
I got wrong number parsing result when import from excel.
My result
SSF format
My handle code
`handleFile(e) {
var files = e.target.files, f = files[0];
var reader = new FileReader();
var rABS = true
var _this = this;
reader.onload = function(e) {
var data = e.target.result;
if(!rABS) data = new Uint8Array(data);
var workbook = XLSX.read(data, {type: rABS ? 'binary' : 'array'});
to_json_first_sheet: function(workbook){
var result = {};
var _this = this;
var sheetName = workbook.SheetNames[0];
var roa = _this.X.utils.sheet_to_json(workbook.Sheets[sheetName],{});
console.log(roa)
if(roa.length) result = roa;
return result;
}
`
My excel file ( github doesn't accept xls file so I updated it into google driver)
https://drive.google.com/file/d/1l1TLlycLpYjrhWzpO5fUipp-UCO49rzU/view
Thanks for sharing! This is a BIFF4 file using codepage 932 with FORMAT records that specify 0 index. Need to dig further, but if the index is always zero then replicating the BIFF2/3 logic for BIFF4 would solve the problem:
mm. well thank you so much for helping me but I still confuse
first how could I get this information above, workbook file or work sheet properties ?
second I still don't know how to implement to read data.
@SheetJSDev
Could you explain this. Thank you
@ToujouAya we are releasing 0.11.11 right now with the fix. Give it some time to show up on NPM and CDNs. Your code should work as-is.
@SheetJSDev
Oh thank you so much. I appreciate