Hi,
I would like to know if it's possible to format my dates and numbers
according to my locale. The HSSFDataFormat class only has American
formats and I need Belgian ones. Although the javadocs state that
HSSFDataFormat 'can handle user defined data formats also', I don't see how.
My current code looks like this:
HSSFDataFormat dataFormat = workbook.createDataFormat();
HSSFFont normalFont = workbook.createFont();
normalFont.setFontName("Arial");
normalFont.setFontHeightInPoints((short) 8);
HSSFCellStyle normalStyle = workbook.createCellStyle();
normalStyle.setFont(normalFont);
HSSFCellStyle currencyStyle = workbook.createCellStyle();
currencyStyle.setFont(normalFont);
currencyStyle.setDataFormat(dataFormat.getFormat("#,##0.00"));
This works and will format my numbers as #,##0.00. But in Belgium,
numbers are formatted like #.##0,00 (point and comma switched). I can't
seem to get this to work.
Can anybody help me with this? Thanks in advance.
Regards,
Kristoff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/