Delimiter is not detected rightly
See original GitHub issueI have a file with no header that contains this data structure
column ; comlumn2,comlumn2,comlumn2,
column ; comlumn2,comlumn2,comlumn2,
column ; comlumn2
here the delimiter is ;
but the library is detecting ,
Is the last line there is no ,
so why the library still detect ,
?
Any solution ?
If I add a header how to tell library to detect delimiter only on header.
I found same case here but I don’t have header and last line does not contain ,
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Excel does not honor the delimiter setting for reading or ...
If I read the question right, it looks like the problem is creating (saving), a delimited file using commas for the delimiter (2nd...
Read more >Wrong Delimiter error even though the right ...
This technote explains how to resolve a "Wrong Delimiter" error. This can occur when using the IBM Rational ClearQuest Import Tool.
Read more >.csv file seems to have a hidden delimeter - recognized by ...
So your CSV isn't comma delimited is what appears to be the problem. The way it looks out of your Notepad copy is...
Read more >Converting CSV to Excel: solutions for common issues
CSV not opening correctly in Excel? The tutorial investigates typical issues and provides the most effective solutions.
Read more >Resolving common problems with CSV files
In a .csv file, a table of values is stored with columns delimited by commas, and with line breaks separating rows. The .csv...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Again,
,
seems to be the “better” delimiter here as it produces more fields (which is probably desired in 90% of all cases).You can set the delimiter directly when parsing or only use the first x lines of the data as I described here: https://github.com/mholt/PapaParse/issues/861#issuecomment-860084246
I do not think we should complicate more the guessing and we should assume that is not perfect (specially when mixing delimiters on data). There is already an option to specify the delimiters to guess (and its a sorted list allowing to prefer
;
over,
). You should use if required.I’m closing this issues as there is nothing else to do from our side. If yo do not agree, please provide some simple solution for your case.
Thanks!