Bug 49027

Summary: Excel French date format not preserved
Product: POI Reporter: Graeme Jones <atombuilder>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: the template (see description)

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.