Format negative value wrong #2568

Open
opened 2020-07-30 03:13:40 +00:00 by 2453929471 · 0 comments
2453929471 commented 2020-07-30 03:13:40 +00:00 (Migrated from github.com)

If I use [<=-1000000]("$"#,##0.0,,"M") to format -1000000, then the result is
image
If I use [<=-1000000]("$"#,##0.0,,"M"); to format -1000000, then the result is
image
Actually they all use [<=-1000000]("$"#,##0.0,,"M") to do format, the only difference is that the second case, we have 2 rules.(separate by ;)

I think we have two problems to solve here:

  • both format results are wrong
  • they two shouldn't have difference results

I check the code, the function eval_fmt(fmt, v, opts, flen) accept flen as a parameter. Does flen matters in formating?

If I use `[<=-1000000]("$"#,##0.0,,"M")` to format `-1000000`, then the result is ![image](https://user-images.githubusercontent.com/11852231/88875677-44b4b200-d254-11ea-89ff-069fe8ceb226.png) If I use `[<=-1000000]("$"#,##0.0,,"M");` to format `-1000000`, then the result is ![image](https://user-images.githubusercontent.com/11852231/88875802-8a717a80-d254-11ea-9a64-34a1c7f8a5b2.png) Actually they all use `[<=-1000000]("$"#,##0.0,,"M")` to do format, the only difference is that the second case, we have 2 rules.(separate by `;`) I think we have two problems to solve here: * both format results are wrong * they two shouldn't have difference results I check the code, the function `eval_fmt(fmt, v, opts, flen)` accept `flen` as a parameter. Does `flen` matters in formating?
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#2568
No description provided.