Format ending with '-' gives "Unsupported Format" #2598

Open
opened 2020-10-27 21:22:08 +00:00 by snoopyjc · 2 comments
snoopyjc commented 2020-10-27 21:22:08 +00:00 (Migrated from github.com)

Some countries format negative numbers with the '-' on the right. Specifying this as a format gives an Unsupported Format error:

Format: #0;#0-
Value: -3.14
Expected: 3-
Actual: Error: unsupported format |0-|
Some countries format negative numbers with the '-' on the right. Specifying this as a format gives an Unsupported Format error: Format: #0;#0- Value: -3.14 Expected: 3- Actual: Error: unsupported format |0-|
snoopyjc commented 2020-10-27 21:23:01 +00:00 (Migrated from github.com)

To fix this, don't include + or - in the numeric format unless proceeded by an "E".

To fix this, don't include + or - in the numeric format unless proceeded by an "E".
SheetJSDev commented 2022-05-27 05:35:51 +00:00 (Migrated from github.com)

Excel autocorrects the format by escaping the slash. In Excel 2019, entering that format in Excel generates the format #0;#0\-. That format does work.

Excel autocorrects the format by escaping the slash. In Excel 2019, entering that format in Excel generates the format `#0;#0\-`. That format *does* work.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#2598
No description provided.