Bug 48617 - Use explicit locale when formatting Excel cells
Summary: Use explicit locale when formatting Excel cells
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.7-dev
Hardware: PC Windows Vista
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
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.