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/12/12 21:40:54 UTC

DO NOT REPLY [Bug 41161] - getDateCellValue() doesn't deal with formula cells returning 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=41161>.
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=41161





------- Additional Comments From amolweb@yahoo.com  2006-12-12 12:40 -------
If you have last saved the file using an external application the following
should give you the expected date value:

HSSFDateUtil.getJavaDate(value);

However, if the cell value was last edited using POI, you will not get the
correct "date" value. This is because until the file is opened by an external
application the formula will not be evaluated and hence the "stored" value will
not reflect the expected value. You could try to use the HSSFFormulaEvaluator to
evaluate the formula cell and then use HSSFDateUtil.getJavaDate to convert the
value to a Java Date.

If this does not resolve your problem,  please post some code that illustrates
the problem.

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