poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44996] Text cells are treated as numeric if they happen to contain only 0-9
Date Wed, 14 May 2008 13:14:59 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44996


Martin Schöffler <martin.schoeffler+asfbugzilla@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.schoeffler+asfbugzill
                   |                            |a@gmail.com




--- Comment #1 from Martin Schöffler <martin.schoeffler+asfbugzilla@gmail.com>  2008-05-14
06:14:58 PST ---
(In reply to comment #0)
> If possible I would like HSSFCell to either quit the guessing and the assuming,
> or implement something like getRawCellType() and getRawStringCellValue() that
> would return the data the user entered and not a processed result.

As I understand it POI is already doing what you propose, as it does no
guessing but only reads what excel wrote to the xls file.
Formatting a cell as text does not mean it is stored as text internally in the
xls-file. Excel automatically stores text that contains only digits as a
NUMERIC.
I had some success in forcing excel to store the value as a string by changing
the value again after I set format to text. The workflow is as follows: entring
value, changing format, changing value. 

But that is not a good workaround. It is best to retrieve the format as pointed
out in bug 39998 and try to format the value accordingly.


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


Mime
View raw message