Wrong numberformat assignment
Created originally on Bitbucket by zeripath (Andrew Thornton)
Hi!
First of all thank you for your work.
There appears to be a bug in the way numberformats are applied in stylesheets. The two attached xlsx files are the same except in the broken case within xl/styles.xml
:
#!xml
<numFmts count="3">
<numFmt numFmtId="164" formatCode="General"/>
<numFmt numFmtId="165" formatCode="General"/>
<numFmt numFmtId="166" formatCode="DD\/MM"/>
</numFmts>
whereas in the not broken case:
#!xml
<numFmts count="3">
<numFmt numFmtId="164" formatCode="General"/>
<numFmt numFmtId="165" formatCode="0"/>
<numFmt numFmtId="166" formatCode="DD\/MM"/>
</numFmts>
And with a little more testing, it appears that any duplicated formatCode will lead to errors in the interpretation of numFmts greater than that duplication.
Attachments: broken.xlsxnot-broken.xlsx