Support formatting mask having more than 4 sections
hy9be opened this issue · 2 comments
hy9be commented
Hi I tried the formatting string below
[>=1000000000]#,#0.0,,,"B";[>=1000000]#,##0.0,,"M";[>=1000]#,##0.0,"K";0.0;[<=-1000000000](0.0,,,"B");[<=-1000000](0.0,,"M");[<=-1000](0.0,"K");[<0](£0.0)
and got an error from the code here: https://github.com/SheetJS/ssf/blob/master/ssf.js#L808
Is there any specific reasons that you throw an exception when the number of fmt sections are more than 4? Thanks!
SheetJSDev commented
@hy9be In theory, it's because of the ECMA-376 spec (section 18.8.31 numFmts
):
Up to four sections of format codes can be specified.
In practice, Excel 2016 does not accept the number format.
hy9be commented
@SheetJSDev Thanks a lot!