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 2006/11/02 10:47:42 UTC

DO NOT REPLY [Bug 40128] - HSSFDateUtil.isCellDateFormatted(cell) returns false when the cell is formatted as a date

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=40128>.
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=40128





------- Additional Comments From miroslav.sulc@startnet.cz  2006-11-02 01:47 -------
I'm not sure this approach is correct. I'm not an MS Excel format expert but if
they say that there are only several formats described as date/time formats in
Microsoft Excel Dev's Kit then only those formats should be guarantied to be
date/time.

I bring this up because I have an Excel file created in OpenOffice that has
"standard number" format for some numbers (data format 164 in my case) and this
format is evaluated by the patch as being date cell (which it definitely is not
in my case). On the opposite, there are cells formated as date (Czech format,
data format 165) and this format is evaluated as not being date cell (which it
definitely is in my case).

I thougth about a more general approach that would determine whether the cell is
date/time or not using the format string specified in the data format and not an
index which seems it really doesn't work across different Excel files. So simply
said, if the formatting string contains date/time formatters then the cell would
be evaluated as date cell, otherwise it is a numeric cell.

I went through the API looking for a way to get HSSFDataFormat for given cell
but found only that I can create instance of it using Workbook object which I
don't know how to get from HSSFWorkbook object. I would like to verify that this
approach will work and eventually write the patch.

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