Hello
Guys,
I tried format cell type with style hour , like this: *hh:mm:ss
*But the excel understand like type text;
My code:
//Create FormatData
HSSFDataFormat dataFormat = workBook.createDataFormat();
HSSFCellStyle styleHour = workBook.createCellStyle();
styleHour.setDataFormat(dataFormat.getFormat("hh:mm:ss"));
*
//*Put at cell
cellHoras = row.createCell((short)3);
cellHoras.setCellStyle(styleHour);
cellHoras.setCellValue(new
HSSFRichTextString(timeFormat.format(atividade.getDataAtividade())));
sheet.autoSizeColumn((short)3);
*
*My object: atividade.getDataAtividade() is java.util.Date and I retrieve
this date only hour , minute and second. DateFormat timeFormat = new
SimpleDateFormat("HH:mm:ss");
I think HSSFRichTextString is my problem or not?
And other question what´s difference between HSSFWorkbook and XSSFWorkbook?
--
raphael milani
:=]