Bug 49027 - Excel French date format not preserved
Summary: Excel French date format not preserved
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2010-03-31 03:02 UTC by Graeme Jones
Modified: 2015-05-31 21:25 UTC (History)
0 users

the template (see description) (24.00 KB, application/vnd.ms-excel)
2010-03-31 03:02 UTC, Graeme Jones

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme Jones 2010-03-31 03:02:14 UTC
Created attachment 25220 [details]
the template (see description)

I wrote a program to generate an Excel spreadsheet containing rows of data in which cells in each column have a particular format. Some columns are french (canadian) dates.

My program works by copying a template which is the same as the output report but with only one blank data row. Each row of data in the output spreadsheet is obtained by cloning the styles in the blank row, and then filling in the data.

This works fine, except when the cell style in the blank row is a French date (i.e. in Excel, pick the Date format, with language French (Canada)).

The dates always show up in English.

Attached is the template (portfolio_template_FR.xls) with columns FGHI formatted as French (Canada) dates. I'd like to attach the output report as well but I am only allowed one attachment below.
Comment 1 Nick Burch 2010-03-31 11:16:27 UTC
Can you check what POI thinks the date formats were before and after?

It'd be useful to check both the format index, and the format string for both

If possible, you should also write a small unit test. This unit test would show loading of the template, making the changes, writing out, reading in the temp file and verifying that the date formats are incorrect. That'll give us something to debug against.
Comment 2 Dominik Stadler 2015-05-31 21:25:19 UTC
No update in a long time, thus resolving this for now, please reopen or report a new bug if this is still an issue for you.