Hi,

I'm new to POI/HSSF and I have a problem when assigning a number format
to a cell in HSSF. Using the following code, the number format is
assigned to the cell (as I can verify from opening the resulting
Excel sheet), however, the format is not applied in the Excel
sheet before I open the cell with a double-click. Then, the chosen
format is applied correctly. Am I missing something e.g. some
sort of "redraw" command after assigning a format?

-- Code --

HSSFCellStyle style = wb.createCellStyle();

style.setDataFormat(HSSFDataFormat.getFormat(HSSFDataFormat.getFormat((short)4)));
this.tableCell.setCellStyle(style);

-- /Code --

Thanks for any help,

J�rgen


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to