Escaped slash is treated as fraction separator #2577

Open
opened 2020-09-27 22:48:55 +00:00 by snoopyjc · 1 comment
snoopyjc commented 2020-09-27 22:48:55 +00:00 (Migrated from github.com)

If a / is escaped like "/" or /, and it's in a place where it could be a fraction separator, then it is incorrectly treated as a fraction separator and not a literal slash.

console.log(SSF.format('???\/???', 123.45))

formats in Excel as ' /123' and here as '2469/20'.

If a / is escaped like "/" or \/, and it's in a place where it could be a fraction separator, then it is incorrectly treated as a fraction separator and not a literal slash. console.log(SSF.format('???\/???', 123.45)) formats in Excel as ' /123' and here as '2469/20'.
snoopyjc commented 2020-10-04 03:04:40 +00:00 (Migrated from github.com)

This is from the ECMA Office XML Part 1 specification:

/    If this symbol is preceded and followed by a number symbol (0, #, and ?), it is interpreted as
     the fraction format symbol and will display the number in the format of a fraction. Otherwise,
     it is interpreted as the forward slash character and is displayed as such.
This is from the ECMA Office XML Part 1 specification: / If this symbol is preceded and followed by a number symbol (0, #, and ?), it is interpreted as the fraction format symbol and will display the number in the format of a fraction. Otherwise, it is interpreted as the forward slash character and is displayed as such.
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#2577
No description provided.