Custom delimiters/separators not working for csv files #1943
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#1943
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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 have a csv file with below entries
However parsed result doesn't consider this and gives incorrect result. Can someone please help
Thanks for reporting! Can you share the file?
If I had to guess, the offending line is https://github.com/SheetJS/sheetjs/blob/master/bits/40_harb.js#L816
Currently it looks for a sequence of the form "sep=" followed by a single character followed by "\n". Normalizing the newlines happens afterwards, so if your file started with "sep=&\r\n" that sequence wouldn't be recognized
Thanks for the quick response @SheetJSDev
I have attached plain text file. The same file was saved as .csv for my testing
FYI.. i tried by changing first line to below and still not working
delimiter.txt
&\n
Yeah this is the problem I stated earlier. To verify, in nodejs:
Transforming by proactively replacing the newlines:
If you'd like to send a fix, that line https://github.com/SheetJS/sheetjs/blob/master/bits/40_harb.js#L816 should be replaced with something like: