Bug when converting a sheet to CSV #2959
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2959
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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,
I'm trying to convert the sheet of an excel file to csv by calling this method

XLSX.writeFile(workBookFinal, "./temp/tempCsv.csv", {bookType: "csv"});
everything works fine. However, I noticed that if a cell contains the string
ID
as text, quotes are inserted inside the csv.For example if I have a row with 3 cells valued like this
i will get:
A,B,"ID"
I expect:
A, B,ID
Thanks
Bug durante la conversione di un fogli in csvto Bug when converting a sheet to CSVExcel treats files that start with ID as "Symbolic Link": https://web.archive.org/web/20140929030911/http://support2.microsoft.com/kb/323626
The parser enforces the same logic.
To ensure that there is no confusion, the writer always wraps every ID in double quotes. The quotes are not needed in any other place.
To immediately fix this issue (only quote the first column), https://git.sheetjs.com/sheetjs/sheetjs/src/branch/master/bits/90_utils.js#L115 should be changed to