mouss4rs
2012-02-25 22:11:06 UTC
Hi,
I would like to write cell in Hours format like this:
hh:mm in .xlsx files.
So, I did this:
cell2 = row2.createCell(2);//on l'écrit à la colonne 2 (semaine 51)
cell2.setCellValue(tabheures[1][e]);
cellStyle = wb2.createCellStyle();
*cellStyle.setDataFormat(fmt.getFormat("hh:mm"));*cell2.setCellStyle(cellStyle);
System.out.println("c'est écrit"+tabheures[1][e]);
But, it create this in my cell:
10/01/1900 12:00:00
whereas that:
tabheures[1][e] equal 10.5
What's happen ?
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Create-cell-in-Hours-Format-tp5515970p5515970.html
Sent from the POI - User mailing list archive at Nabble.com.
I would like to write cell in Hours format like this:
hh:mm in .xlsx files.
So, I did this:
cell2 = row2.createCell(2);//on l'écrit à la colonne 2 (semaine 51)
cell2.setCellValue(tabheures[1][e]);
cellStyle = wb2.createCellStyle();
*cellStyle.setDataFormat(fmt.getFormat("hh:mm"));*cell2.setCellStyle(cellStyle);
System.out.println("c'est écrit"+tabheures[1][e]);
But, it create this in my cell:
10/01/1900 12:00:00
whereas that:
tabheures[1][e] equal 10.5
What's happen ?
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Create-cell-in-Hours-Format-tp5515970p5515970.html
Sent from the POI - User mailing list archive at Nabble.com.