Sanjiv,
you could switch on getCellType() and contruct the string representation
yourself.
You may also want to consider using HSSFDataFormat class to format the
string
as seen in excel.

~ amol

> -----Original Message-----
> From: Sanjiv Jivan [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 26, 2005 2:25 PM
> To: POI Users List
> Subject: HSSFCell.getStringCellValue too strict
> 
> 
> Hi,
> HSSFCell.getStringCellValue() thows various 
> NumberFormatException's if the 
> data type in Excel is not of String type. I think this is too strict. 
> Throwing an exception when getting a number from String field 
> makes sense 
> but I would much prefer if HSSFCell.getStringCellValue returned to 
> toString() value of whatever the cell value.
> 
> Thanks,
> Sanjiv
> 

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

Reply via email to