Skip to content
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

Not parsing line delimiter correctly in CSV #648

Closed
charlesread opened this issue May 6, 2017 · 1 comment
Closed

Not parsing line delimiter correctly in CSV #648

charlesread opened this issue May 6, 2017 · 1 comment

Comments

@charlesread
Copy link

I have a very simple CSV file (two columns, first is a number, second is a string) that I am trying to parse, when XLSX parses it I get the output below. I don't see any options for specifying the line delimiter and I am not entirely sure what's going on, how can I fix this?

1,charles
2,cricket
3,ladybug
4,sara

==>

{ A1: { t: 'n', w: '1', v: 1 },
  B1: { t: 's', v: 'charles\r2' },
  C1: { t: 's', v: 'cricket\r3' },
  D1: { t: 's', v: 'ladybug\r4' },
  '!ref': 'A1:D1' }
@charlesread
Copy link
Author

I greatly appreciate the effort! But now the XLSX.readFile() returned object is just

{ Sheets: {},
  SheetNames: [],
  Workbook: { Sheets: [] },
  SSF: 
   { '0': 'General',
     '1': '0',
     '2': '0.00',
     '3': '#,##0',
     '4': '#,##0.00',
     '9': '0%',
     '10': '0.00%',
     '11': '0.00E+00',
     '12': '# ?/?',
     '13': '# ??/??',
     '14': 'm/d/yy',
     '15': 'd-mmm-yy',
     '16': 'd-mmm',
     '17': 'mmm-yy',
     '18': 'h:mm AM/PM',
     '19': 'h:mm:ss AM/PM',
     '20': 'h:mm',
     '21': 'h:mm:ss',
     '22': 'm/d/yy h:mm',
     '37': '#,##0 ;(#,##0)',
     '38': '#,##0 ;[Red](#,##0)',
     '39': '#,##0.00;(#,##0.00)',
     '40': '#,##0.00;[Red](#,##0.00)',
     '45': 'mm:ss',
     '46': '[h]:mm:ss',
     '47': 'mmss.0',
     '48': '##0.0E+0',
     '49': '@',
     '56': '"上午/下午 "hh"時"mm"分"ss"秒 "',
     '65535': 'General' },
  Props: {},
  Custprops: {} }

RimaCiklum pushed a commit to Folcon/js-xlsx that referenced this issue Aug 20, 2020
- updated SSF to 0.9.2
- XLSB style records and number format writing
- CSV avoid parseFloat (fixes SheetJS#646 h/t @jabbermarky)
- CSV recognize mac line ending (fixes SheetJS#648 h/t @charlesread)
- BIFF2 format table refactored to align with SSF
- BIFF5 image data exposure
- SSF custom format auto table update (fixes SheetJS#267 h/t @Fangmingdu)
- eslint more checks
- browser test timeout extended to 10 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant