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
Can you clarify what "didn't work" means? Did you get an error? Something else?
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
This bug needs a full unit test and possibly a German excel file.