SheetJS / sheetjs

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs
https://sheetjs.com/
Apache License 2.0
35.02k stars 8k forks source link

Formats with multiple leading 000s need to preserve these in the output #2581

Open snoopyjc opened 4 years ago

snoopyjc commented 4 years ago

Formats with multiple leading 000s need to preserve these in the output:

console.log(SSF.format('000.0', 1))
1.0  (Excel gives 001.0)
console.log(SSF.format('000.#', 1))
1.  (Excel gives 001.)
console.log(SSF.format('000.0', 1.2))
1.2  (Excel gives 001.2)
console.log(SSF.format('000.#', 1.2))
1.2  (Excel gives 001.2)
snoopyjc commented 4 years ago

This is matching 'dec1'.

clement911 commented 3 years ago

We're also running into this bug. It's a pretty basic format though, it's the first one we tried.