https://bz.apache.org/bugzilla/show_bug.cgi?id=60422

--- Comment #17 from RBRi <r...@rbri.de> ---
In general Excel respects the locale settings (at least on Win it is possible
to configure this independently from the locale to whatever you like). But i
have not seen any problems when exchanging documents between different
settings. So my good-feeling is:
The format string stored inside the file uses chars with a fixed semantic
(means there are some special chars like -,#,0, the dot, the comma and so on).

I would expect that the format string parser has a list of constants (chars)
acting as tokens for the parser.

> This cell format is added as a custom format in FormatTrackingHSSFListener.
> The Format String is:
> _-* #,##0.00\ "€"_-;\-* #,##0.00\ "€"_-;_-* "-"??\ "€"_-;_-@_-

The next step is the display. MS seems to have made the decision to always use
a localized display. If this is clever or not (at least when showing the format
string might be a different story).

> This is not what Excel run in Germany locale on My Mac shows - it shows this 
> for > Accounting/Buchhaltung:
> _-* #.##0,00 €_-;-* #.##0,00 €_-;_-* "-"?? €_-;_-@_-

So i can confirm the effect here. If you like to proof this you can change the
decimal delimiter to e.g. 'y' and the display of the number in excel itself and
the display of the format string changes in my case it looks like this
_-* #.##0y00 €_-;-* #.##0y00 €_-;_-* "-"?? €_-;_-@_-

>From the POI API point of view i like to see this behavior:
   final DataFormatter tmpDataFormatter = new DataFormatter(aLocale);
The locale provided here represents the windows system settings, if i change
eg.g the decimal separator here the following call of 
    final String tmpResult = tmpDataFormatter.formatCellValue(tmpCell,
aFormulaEvaluator);
should respect my separator.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to