Hi Sanjiv.

It can't work. It's a variant and the type determines which field has to
be read. So when there's a numeric value inside the content of the
string field may be arbitrary.

With formulas there are less exceptions. There you just receive an empty
value if you query with the wrong type.

Regards,        Karl-Heinz.


-----Ursprüngliche Nachricht-----
Von: Sanjiv Jivan [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 26. August 2005 20:25
An: POI Users List
Betreff: 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