Unsupported format: 0,### #2896
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#2896
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
I wonder how this library achieved such a wide adoption (~2M weekly downloads on npmjs) with such basic bugs.
Last publish: 3 years ago
Not good signs...
The format codes are based on the
en-US
interpretation:,
is the thousands separator and.
is the decimal separator.If you're intending to format a number with no thousands separator and "up to 3" decimal places, the format is
0.###
.0,###
is interpreted as follows: "sign" (-
for negative) "thousands" (Math.floor(Math.abs(value) / 1000)
) "comma" (always present) "residue" (Math.floor(value % 1000)
). For example,11.1
(111 divided by 10) is rendered as0,11
Since that format is not working, we consider this a bug.
On a broader note, the SSF library exists to support conversions from spreadsheet formats like XLSX to plaintext formats like CSV. XLSX persists a format code like
0.###
and values like11.1
, and file readers are expected to generate the formatted text.Excel and other spreadsheet software present a localized format in the UI but actually write the US form in the file itself. This also applies to date format:
de-DE
Excel uses a date format likeJJJJ-MM-TT
and Excel translates that toYYYY-MM-DD
under the hood.