Bug 55063 - Can not use "/" as delimiter for date in german excel
Summary: Can not use "/" as delimiter for date in german excel
Status: NEEDINFO
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.9-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-05 11:28 UTC by Michael
Modified: 2016-09-22 03:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2013-06-05 11:28:23 UTC
Hi,

i tried to set a '/' as a delimiter for a date field in a german excel (2003) without success.

I can set any other char (also some nonsense like '+') but i didn't get it to work with '/';

this works: 
- cellStyle.setDataFormat(dataFormat.getFormat("MM-DD-YYYY"));
- cellStyle.setDataFormat(dataFormat.getFormat("DD-MM-YYYY"));
- cellStyle.setDataFormat(dataFormat.getFormat("MM+DD+YYYY"));

and this didn't work:
- cellStyle.setDataFormat(dataFormat.getFormat("MM/DD/YYYY"));

cheers, michael
Comment 1 Nick Burch 2013-06-05 14:59:15 UTC
Can you clarify what "didn't work" means? Did you get an error? Something else?
Comment 2 Michael 2013-06-06 04:44:12 UTC
Oh sorry,

if i have a look at the custom format for the cell in Excel the '/' is replaced by a '.'.

If i set cellStyle.setDataFormat(dataFormat.getFormat("MM//DD//YYYY")) then i get MM..TT..JJJJ.

In Excel i can set the format MM/TT/JJJJ.

cheers, michael
Comment 3 Javen O'Neal 2016-09-22 03:53:02 UTC
This bug needs a full unit test and possibly a German excel file.