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


Jim Garrison <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal




--- Comment #2 from Jim Garrison <[email protected]>  2009-07-07 15:21:57 PST 
---
Based on my analysis I've come up with a workaround.  At the point in my code
where I'm calling HSSFDataFormatter.formatCellValue(cell) I know that I want
the numeric cell as a string, so I force the cell style to General as follows:

    HSSFCellStyle cs = cell.getCellStyle();
    cs.setDataFormat((short)-1);
    cell.setCellStyle(cs);
    value = new HSSFDataFormatter().formatCellValue(cell);

This returns the value formatted as it would be displayed assuming the column
width were sufficient -- I.e. it provides the entire value and not a rounded or
scientific-notation abbreviation.

I'm not sure how POI should handle the situation, so I'll leave that up to more
knowledgeable developers.

-- 
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