poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andihartm...@freenet.de>
Subject Reading cells as they are formated by the user in the sheet
Date Wed, 25 Jan 2006 07:16:22 GMT

I have to read datas from cells in excel sheets. The goal is, to get the
data as they are formated by the user, who wrote the sheet.


A cell is formated as text. The user wrote in this cell the number 13.
Excel shows this number as the user wrote it (as 13), but POI recognizes
this cell as a number cell (which is wrong), though the user defined it as
text. If I'm Reading the cell with POI as number, the value I get is 13.0,
which is wrong again (must be 13).

Another example:

Somewhere in the sheet, there is a cell, which does a calculation. The
value of the calculation may be 15. Another cell in excel references this
value and shows 15 too, as expected. This cell is formated as number in
excel. When I'm reading the cell with the referenced value with POI, I'm
getting 15.0, which is wrong again.

In short: how can I read with POI a cell just like they is shown in excel?

Thanks for any advice,
kind regards,
Andreas Hartmann

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