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 2007/04/19 19:40:34 UTC

DO NOT REPLY [Bug 39998] - Conversion of numbers while reading through HSSF

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39998>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39998


yegor@dinom.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From yegor@dinom.ru  2007-04-19 10:40 -------
It's not a POI bug. What you see in Excel is not exactly the same what is stored
in xls file. To get the formated values you need to do the following:

 (1) get raw value as double
 (2) get the cell formatter as follows:

  HSSFDataFormat dataformat = workbook.createDataFormat();
  short idx = style.getDataFormat();
  String format = dataformat.getFormat(idx);

  (3) create appropriate Java formatter and convert double to string

Regards,
Yegor



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/