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

           Summary: Text cells are treated as numeric if they happen to
                    contain only 0-9
           Product: POI
           Version: 3.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


I'm not sure if my problem is identical to 39998, but here goes:

In the description of the class HSSFCell is says ” String cells cannot
conatin numbers and numeric cells cannot contain strings (at least according to
our model).”
This model causes some problems that are hard to work around when dealing with
users input:

1. A string cell, that is a cell for which the format in Excel has explicitly
been specified as “Text”, should be allowed to contain anything. But if the
cell happens to contain only characters in the range ‘0’-‘9’
getCellType() returns NUMERIC and getRichStringCellValue() throws an exception.

2. A date cell, again explicitly formatted as such in Excel, is also treated as
numeric cell when it contains a date like “01.07.2008”


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.


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