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