You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Olivier Matt <in...@kodee.org> on 2005/10/11 17:52:47 UTC

strange values in numeric field

Hi,

I'm using HSSF to read some cells in an excel file.
The cell I'm reading is displayed as "1/01/05" (a date) by Microsoft  
Excel.
In my java program, first i get the cell:

switch ( cell.getCellType() ) {
                          case HSSFCell.CELL_TYPE_NUMERIC:
                              switch(cell.getCellNum())
                              {
                                  case 0: date = new String((new  
Double (cell.getNumericCellValue())).toString()); break;   // <--  
look here
                                  default:System.out.println("dont  
understand numeric(row " + row.getRowNum() + " cell "
                                                              +  
cell.getCellNum() + ") = " + cell.getNumericCellValue());
                                                              break;
                              }
                              break;


and then later I display it ... and I see the content as "38383.0"...
I dont understand how I shoud interpret it...

any advise ?

Thanks,

Olivier Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/