Add | (pipe) as a potential CSV cell separator. #1348
No reviewers
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#1348
Loading…
Reference in New Issue
No description provided.
Delete Branch "master"
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?
Hi
A number of financial file format standards make use of the pipe as a CSV cell separator
it would be nice if you could accept this feature
I used 0 as weight thinking it was the lowest priority (i hope i didn't misread the code)
let me known if you need more info/some changes to accept the pull request
Thanks
David
Hi guys
any chance this patch/feature would be approved ?
Even though Excel doesn't normally handle pipe separators, this PR is mostly ok. It's better to set the weights to 4/3/2/1.
Related questions:
What standards use the pipe character? (pick a relatively important standard we can note in the README)
Should ASCII 0x01, used as a delimiter in FIX, also be supported? (your opinion)
Should ASCII 0x1F (field sep) and ASCII 0x1E (row sep) also be supported? (your opinion)
Thanks for your reply
My answers :
please note that the pipe is not specified by those but is the de facto cell separator that the industry is using to exchange those files
Hello again
i found a surprising behaviour - i don't whether it's related to my patch or not
so here it comes may be it will be meaningful to you
when parsing (valid) csv files with pipe as separator, sometimes XSLX does not detect the pipe as the separator even though it is by far the most frequent of the separators
if i replace all pipes with ; it detects the ; as separator
if i replace all pips with , it detects the , as separator
i finally found what (seems to) causes the issue : it happens when the whole file does NOT contains any , or ; !!
if this is the case, it seems the detection falls back to an incorrect separator
i tried a (dirty) workaround in my own code using XLSX :
i added an extra column (replaced the first end-of-line with |, pipe-comma)
then hurray the parsing actually uses the pipe as separator
meaning
will fail to detect the pipe whereas
would!
if any of the cell value on any line of the file did contain a , or a ; the issue would not happen either
(this is what made my analysis harder to narrow down what was wrong)
i tried to track the issue in the code but lost myself :(
0a0244cdfa
Pull request closed