Problem with reading non-en-US numbers from HTML file #3227
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#3227
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?
If I try to read numbers that end in 0, the library deletes all the “0” at the end of the number.
For example if I have 10,000 in the excel file, it reads 10, if I have 23,980 instead it reads 23,98
Can you share a sample file?
Under the hood, SheetJS uses en-US locale settings:
,
is the thousands separator and.
is the decimal point. If you are in a locale that uses different settings, the plaintext parsers may misinterpret values.Hello,
this is the example of excel file that is generated by other management software I have.
Greetings,
Thanks for sharing!
Your "XLS" file is really a HTML table. The TD elements are parsed using JS built-in features, which assume en-US interpretation. For example:
This is probably the value
10000
(1.0e+4
).If you have control over the HTML generation, use the
data-
overrides to specify the true value and the desired number format.The general problem is tracked in issue #3180
Problem with reading numbers from excel fileto Problem with reading non-en-US numbers from HTML file