poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yegor Kozlov <yegor.koz...@dinom.ru>
Subject Re: fixed regression in HSSF
Date Thu, 10 Feb 2011 14:55:28 GMT
On 2/10/2011 5:42 PM, Nick Burch wrote:
> On Thu, 10 Feb 2011, Yegor Kozlov wrote:
>> Since BuiltinFormats is a common class shared by HSSF and XSSF, I 
>> think it is best to escape format definitions hardcoded in it. I 
>> committed the fix in r1069396.
>
> Do .xlsx files generated by excel have the escaped or non-escaped 
> form? If they have the old BuiltIn style form, we should maybe just 
> add the escaping when we create the record
>

Yup, .xlsx escapes dollars and brackets too. I created a test file in 
Office 2007 and see that dollar is enclosed in double quotes:

<styleSheet>
<numFmts count="4">
<numFmt numFmtId="42" formatCode="_("$"* #,##0_);_("$"* \(#,##0\);_("$"* 
"-"_);_(@_)"/>
<numFmt numFmtId="41" formatCode="_(* #,##0_);_(* \(#,##0\);_(* 
"-"_);_(@_)"/>
<numFmt numFmtId="44" formatCode="_("$"* #,##0.00_);_("$"* 
\(#,##0.00\);_("$"* "-"??_);_(@_)"/>
<numFmt numFmtId="43" formatCode="_(* #,##0.00_);_(* \(#,##0.00\);_(* 
"-"??_);_(@_)"/>
</numFmts>
....


So the fix seems to be OK for both HSSF and XSSF.

Yegor



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message