Bug 45853 - Date edited using Open Office not work with POI.
Summary: Date edited using Open Office not work with POI.
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.1-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2008-09-20 08:30 UTC by avdhesh yadav
Modified: 2008-09-22 03:26 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description avdhesh yadav 2008-09-20 08:30:27 UTC
First create a excel file using ms office. add a date (d m y) in a cell and any string cell.Then try to read this field with poi.everything work file.poi is able to tell us that it a date.HSSFDateUtil.isCellDateFormatted(cell) method returns true.

Now open same excel file in openoffice.edit the cell where we added the String.do not change the cell where we added date.save the file from excel.

This time when we try to read the excel file.HSSFDateUtil.isCellDateFormatted(cell) method returns false.

Expected - > The file which is being edited by openoffice should be handled properly by POI. but unfortunatly this is not the case.The written for ms excel break when same file read/edited by using open office.POI should handle this case.
Comment 1 Nick Burch 2008-09-21 09:45:42 UTC
What's the date format that excel outputs, and what's the one that open office outputs? How has oo changed it? Have you tried with a recent svn checkout of poi?

(Call getCellStyle on the cell, then getDataFormatString, that'll give you the format string used)
Comment 2 avdhesh yadav 2008-09-22 01:23:30 UTC
when i call cellStyle.getDataFormat(); method on the cell which contains date for excel file ,it return 15.In case of file edited with open office it returns data format 166.

After updating POI 3.5 beta . this problem resolved.