Processing base64 CSV/TXT with first cell starting with "ID" #651
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#651
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 have an xlsx file (attached) with first cell starting with "ID" text and the base64 process failed. It doesn't works only with uppercase text. If I try to import the xlsx file, it works fine.
The demo link is http://oss.sheetjs.com/js-xlsx/.
Text to encode is
The base64 text, encoded from https://www.base64encode.org/, is
It seems like the "ID" text is a reserved key. Can someone help me understanding what happens and maybe give me a solution?
File Starting with ID.xlsx
This mimics Excel: Files starting with the letters
ID
are interpreted as the SYLK format.If you actually try to open the original text in Excel, you get an error message:
The most common workaround is for the tool generating the file to wrap the word ID in double quotes:
We probably should proactively try to interpret as CSV/TXT if the SYLK processing fails (or at least give some informative message).
Note: the base64 encoding of the original xlsx file (which avoids the problem altogether) is: