Exporting an oracle table with a DATE column produces wonky results when used with an Excel Spreadsheet.
Pre-condition
DATE in Oracle: 00-01-01
Expected Results
Column in Excel: 00-01-01
Actual Results
Column in Excel: -2208960000000
Software
DBUnit 2.4.7
POI 3.2-FINAL
This file fixes the problem in a fairly reasonable way.
I have attached an updated XlsDataSetWriter which defaults to the old behaviour but if you set the date format parameter it will output a sensible formatting.
If I remember correctly there were problems with reading and afterwards writing Excel files when using the standard date format. This was why I changed it to be numeric be default (some testcases started to fail with standard date format).
You can nevertheless overwrite XlsDataSetWrite.setDateCell(HSSFCell cell, Date value, HSSFWorkbook workbook) to change it to your custom behavior. If all testcases work with your fix we could discuss about changing it back again (perhaps a new POI version works properly now?)
rgds
matthias