Bug 54034 - org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted can't work right when excel2007 cell format is "yyyy-MM-ddTHH:mm:ss"
Summary: org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted can't work right whe...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-22 01:23 UTC by wangwei
Modified: 2014-05-23 09:18 UTC (History)
1 user (show)



Attachments
the sample file (8.63 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-10-22 01:23 UTC, wangwei
Details
testcase (1.27 KB, application/octet-stream)
2012-10-22 10:29 UTC, wangwei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wangwei 2012-10-22 01:23:05 UTC
Created attachment 29504 [details]
the sample file

org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted can't work right when excel2007 cell format is "yyyy-MM-ddTHH:mm:ss". The method return false that is not right,because we call getDateCellValue() on the Cell object,it return the right java.util.Date.

Use the Book1.xlsx to reproduce it.
Comment 1 wangwei 2012-10-22 01:30:29 UTC
please also check org.apache.poi.ss.usermodel.DataFormatter.formatRawCellContents for format string "yyyy-MM-ddTHH:mm:ss". it can't process it right.
Comment 2 Nick Burch 2012-10-22 09:48:50 UTC
Are you able to create a unit test that shows the problem? (problems?) And does it work for other simpler formats?
Comment 3 wangwei 2012-10-22 10:29:51 UTC
Created attachment 29505 [details]
testcase
Comment 4 wangwei 2012-10-26 06:53:01 UTC
it work for other simpler formats.
Comment 5 Nick Burch 2014-05-23 09:18:32 UTC
Thanks for the testcase for this, fixed in r1597038.