poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KHZ (SAW)" <karl-heinz.zenge...@sawag.com>
Subject AW: HSSFCell.getStringCellValue too strict
Date Mon, 29 Aug 2005 10:12:39 GMT
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:sanjiv.jivan@gmail.com] 
Gesendet: Freitag, 26. August 2005 20:25
An: POI Users List
Betreff: HSSFCell.getStringCellValue too strict

HSSFCell.getStringCellValue() thows various NumberFormatException's if
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
but I would much prefer if HSSFCell.getStringCellValue returned to 
toString() value of whatever the cell value.


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/

View raw message