Bug 48617 - Use explicit locale when formatting Excel cells
Use explicit locale when formatting Excel cells
Product: POI
Classification: Unclassified
Component: HSSF
PC Windows Vista
: P2 normal (vote)
: ---
Assigned To: POI Developers List
Depends on:
  Show dependency tree
Reported: 2010-01-26 01:56 UTC by Jukka Zitting
Modified: 2010-01-26 08:22 UTC (History)
0 users

proposed patch (5.47 KB, application/octet-stream)
2010-01-26 01:56 UTC, Jukka Zitting

Note You need to log in before you can comment on or make changes to this bug.
Description Jukka Zitting 2010-01-26 01:56:21 UTC
Created attachment 24887 [details]
proposed patch

As already noted in bug 47372, the current Excel cell formatting code in POI always uses the current default locale. This can be troublesome as the exact
output may be hard to predict without explicitly setting the default locale
(which is not possible in many environments).

It would be great if it was possible to specify the locale that you want to
be used when formatting numbers and dates. See the attached patch for a proposed
way to do this.

For more background, see https://issues.apache.org/jira/browse/TIKA-371.
Comment 1 Nick Burch 2010-01-26 08:22:40 UTC
Thanks. Patch applied to svn, along with a unit test that seems to show it behaves as expected.