You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/05/06 04:43:13 UTC
DO NOT REPLY [Bug 40028] NaN Cell Value appears as
3.48484087130803E+308
https://issues.apache.org/bugzilla/show_bug.cgi?id=40028
Josh Micich <jo...@gildedtree.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
Summary|no valid zero Cell Value |NaN Cell Value appears as
| |3.48484087130803E+308
--- Comment #2 from Josh Micich <jo...@gildedtree.com> 2008-05-05 19:43:13 PST ---
IEEE NaN is a little bit tricky, and Excel makes a big mess of it. I believe
if you put NaN in a formula (encoding that value in a NumberPtg) Excel will
display '#NUM!', which is sort of expected. Excel seems to get NaN wrong for a
(non formula) cell with a plain number value.
Perhaps the most consistent way to translate the concept of NaN to an Excel
cell value would be to set the error code value to '#NUM!'. The following code
can do that:
if(Double.isNaN(d)) {
cell.setCellErrorValue(HSSFErrorConstants.ERROR_NUM);
} else {
cell.setCellValue(d);
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org