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 2009/03/23 14:55:09 UTC
DO NOT REPLY [Bug 46890] New: Text-formatted cells need to be
recognized as CELL_TYPE_STRING - regardless from their content
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
Summary: Text-formatted cells need to be recognized as
CELL_TYPE_STRING - regardless from their content
Product: POI
Version: 3.2-FINAL
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: alesinskyy@googlemail.com
It seems that if cell contains valid number then POI always consider it type as
NUMERIC - even if the cell carries text format.
--
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
DO NOT REPLY [Bug 46890] Text-formatted cells need to be recognized
as CELL_TYPE_STRING - regardless from their content
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
--- Comment #6 from Nick Burch <ni...@torchbox.com> 2009-03-24 08:35:14 PST ---
For a numeric cell, the "text as shown by excel" isn't stored anywhere. Please
follow standard POI practice, get the floating point number + format string,
and format it yourself
--
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
DO NOT REPLY [Bug 46890] Text-formatted cells need to be recognized
as CELL_TYPE_STRING - regardless from their content
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
alesinskyy@googlemail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #5 from alesinskyy@googlemail.com 2009-03-24 07:47:31 PST ---
Sorry, but I want to reopen this issue once more - the problem is that Excel
(2003 and, likely, other versions as well) exhibits somewhat odd behavior - if
cell containing valid numeric value is formated as text Excel still recognizes
it as numeric till it would be edited once more, at least with "change-nothing"
editing (in case if "Number stored as text" error checking rule is activated
"Ignore error" should be confirmed for each affected cell as well).
It would be very nice to allow obtain string value (exactly as it is shown by
Excel) of the such cell (which has numeric type, but text formatting) - now it
throws exception. I'm not sure if it is attainable or this restriction comes
directly from Excel.
Regards,
Oleksandr
--
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
DO NOT REPLY [Bug 46890] Text-formatted cells need to be recognized
as CELL_TYPE_STRING - regardless from their content
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
alesinskyy@googlemail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |INVALID
--- Comment #4 from alesinskyy@googlemail.com 2009-03-24 05:51:14 PST ---
Hi,
I was wrong - POI 2.5.1 has behave practically the same. The real problem lies
in DBUnit as such, not in POI.
--
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
DO NOT REPLY [Bug 46890] Text-formatted cells need to be recognized
as CELL_TYPE_STRING - regardless from their content
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
alesinskyy@googlemail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #2 from alesinskyy@googlemail.com 2009-03-23 07:59:17 PST ---
Yes, probably it gets, but it causes a lot of problems.
BTW, older versions of POI (e.g. 2.5.1) used to return string in such cases.
This change of behavior has broken DBUnit XLSDataSet, for example.
And even worse - I have not found any clear reference to this (rather breakin)
change neither in the documentation, nor in the changelog.
It is relatively clear, that if cell is formatted as "text", then it contents
has to be treated text, not number. That means that cell content may be taken
"as-is".
--
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
DO NOT REPLY [Bug 46890] Text-formatted cells need to be recognized
as CELL_TYPE_STRING - regardless from their content
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
alesinskyy@googlemail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alesinskyy@googlemail.com
--
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
DO NOT REPLY [Bug 46890] Text-formatted cells need to be recognized
as CELL_TYPE_STRING - regardless from their content
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEEDINFO
--- Comment #3 from Nick Burch <ni...@torchbox.com> 2009-03-23 08:19:03 PST ---
Pretty sure that POI has always returned NUMERIC for cells that excel has
stored as a floating point number, and only returns STRING for cells where the
additional string record is used
If a cell is really numeric, then excel stores a float. You need to fetch back
that float, then apply string formatting rules to make a string. You can't
fetch "a string", as there isn't one in the file, all there is is the float + a
formatting string.
If you'd care to upload a unit test that shows this differently from poi 2.5 to
now, we'll take a look, but I'm fairly sure this is still an INVALID
--
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
DO NOT REPLY [Bug 46890] Text-formatted cells need to be recognized
as CELL_TYPE_STRING - regardless from their content
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46890
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Nick Burch <ni...@torchbox.com> 2009-03-23 07:16:09 PST ---
POI will give you the cell type that excel set for the cell
You should check the cell formatting rules to see how your numeric cells are
formatted
--
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