-
-
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
CSV with UTF8 BOM #650
Comments
@charlesread can you share the actual file (either email the raw file or zip it and upload to github)? If I understood the issue, this should be reproducing the original file: var data = "1,charles\r\n2,cricket\r\n3,ladybug\r\n4,sara\r\n";
require('xlsx').read(data, {type:"binary"}); We added tests to the suite to verify the line endings work properly. I also manually checked all three line endings ( > require('xlsx').version
'0.10.0'
> require('xlsx').read("1,charles\r2,cricket\r3,ladybug\r4,sara\r", {type:"binary"}).Sheets.Sheet1
{ A1: { t: 'n', w: '1', v: 1 },
B1: { t: 's', v: 'charles' },
A2: { t: 'n', w: '2', v: 2 },
B2: { t: 's', v: 'cricket' },
A3: { t: 'n', w: '3', v: 3 },
B3: { t: 's', v: 'ladybug' },
A4: { t: 'n', w: '4', v: 4 },
B4: { t: 's', v: 'sara' },
'!ref': 'A1:B4' }
> require('xlsx').read("1,charles\r\n2,cricket\r\n3,ladybug\r\n4,sara\r\n", {type:"binary"}).Sheets.Sheet1
{ A1: { t: 'n', w: '1', v: 1 },
B1: { t: 's', v: 'charles' },
A2: { t: 'n', w: '2', v: 2 },
B2: { t: 's', v: 'cricket' },
A3: { t: 'n', w: '3', v: 3 },
B3: { t: 's', v: 'ladybug' },
A4: { t: 'n', w: '4', v: 4 },
B4: { t: 's', v: 'sara' },
'!ref': 'A1:B4' }
> require('xlsx').read("1,charles\n2,cricket\n3,ladybug\n4,sara\n", {type:"binary"}).Sheets.Sheet1
{ A1: { t: 'n', w: '1', v: 1 },
B1: { t: 's', v: 'charles' },
A2: { t: 'n', w: '2', v: 2 },
B2: { t: 's', v: 'cricket' },
A3: { t: 'n', w: '3', v: 3 },
B3: { t: 's', v: 'ladybug' },
A4: { t: 'n', w: '4', v: 4 },
B4: { t: 's', v: 'sara' },
'!ref': 'A1:B4' } |
Absolutely, I just emailed contact@. Thanks! |
RimaCiklum
pushed a commit
to Folcon/js-xlsx
that referenced
this issue
Aug 20, 2020
- SSF update to address extendscript issue (fixes SheetJS#608 h/t @mjdb3d) - XLSX cellDates set date format (fixes SheetJS#647 h/t @psalmody) - ODS add stub stylesheet for Excel (fixes SheetJS#649 h/t @WaqasJaved1) - CSV with UTF8 BOM (fixes SheetJS#650 h/t @charlesread) - DIF/CSV fuzzy date speculation - SYLK parse RC formulae - CSF utils for manipulating workbooks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I greatly appreciate the effort in #648! But now the
XLSX.readFile()
returned object is justThe text was updated successfully, but these errors were encountered: