https://issues.apache.org/bugzilla/show_bug.cgi?id=40028


Josh Micich <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to