On Thu, 26 Jul 2012, David Sills wrote:
                    HSSFCellStyle cellStyle =
workbook.createCellStyle();

                    HSSFDataFormat formatter =
workbook.createDataFormat();

                    short idx = formatter.getFormat(dateFormat);
                    if (idx > -1)
                    {
                          cellStyle.setDataFormat(idx);
//                         cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
                          cell.setCellValue((Date) o);
                    }

Aren't you missing the code to apply the cell style to the cell?

eg cell.setCellStyle(cellStyle) ?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to