ExcelNumberFormat
ExcelNumberFormat copied to clipboard
Does not work for some symbols
Hi @andersnm,
Thank you for this work, really helpful!
We noticed that the Library was to able to parse ¥ and £ in NumberFormats (but € works for example). We found a workaround which is to simply add quotes: "¥" will work.
Example: (€* #,##0);(€* (#,##0);(€* "-");(@) will be parsed and format the value as expected. (¥* #,##0);(¥* (#,##0);(¥* "-");(@) causes error. ("¥"* #,##0);("¥"* (#,##0);("¥"* "-");(@_) will be parsed and format the value as expected.
Cheers, Romain
Hi!
Thanks for this. Indeed Excel (2016) accepts any non-token literals in number formats, and so should this library. Surprised this wasn't caught before, although if you input that number format manually in Excel and save, and then inspect the XML it has been escaped:
<numFmt numFmtId="166" formatCode="\(\¥* #,##0\);\(\¥* \(#,##0\);\(\¥* "-"\);\(@\)"/>
I supect those characters are technically "non-standard", iirc the spec defines a relatively short list of permitted characters.