You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by littlenoodles <ry...@harris.com> on 2013/04/02 18:24:46 UTC

Re: HSSFDataFormat.getBuiltinFormat("($#,##0.00);($#,##0.00)"); no longer works in 3.9

Nick Burch <apache <at> gagravarr.org> writes:

> 
> On Wed, 27 Mar 2013, littlenoodles wrote:
> > I guess it needs the dollar signs quoted now.  The regression note I 
> > found said something like that - I just didn't understand what it was 
> > getting at.  The format also seems to have a trailing underscore in the 
> > first (non-negative?) pattern that wasn't there before.
> 
> The commit that changed that was:
> 
> r1069396 | yegor | 2011-02-10 14:07:04 +0000 (Thu, 10 Feb 2011) | 1 line
> 
> fixed a regression caused by not escaped dollar sumbols, see r1061288 and 
> Bugzilla 49928
> 
> I think, but it's been a while since then and it wasn't my change, that 
> what we had in the built-ins wasn't quite what excel was normally storing
> 
> Does anyone know if any of those formats have a "name"? It'd be good if 
> people could reference them by such a thing, if it existed, but I have a 
> feeling that there may not be any such name/description for the main built 
> in formats...
>

Whether the format has a name or not, as long as the 'standard currency' format
is always at index 7, that works too.  Kind of weird to be coding for the long
format strings anyway.  For what it's worth, I've been adding my own format
string for 'currency without pennies', since there doesn't seem to be a built-in
one for that.  I suppose I could've done the same thing for this format - just
add it as a custom format and ignore the built-in one...




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