Hi,
We have a problem when export csv file to xls/xlsx file, it is viewing the date as mm-dd-yyyy if the first two digits are 12 or less, but otherwise viewing them as dd-mm-yyyy. This stuffs up any sorting.
Here is our code to convert:
//Createing and TAB delimited LoadOptions object
LoadOptions loadOptions = new LoadOptions(FileFormatType.TAB_DELIMITED);
//Instantiating a Workbook object
Workbook workbook = new Workbook(myTemporaryFile,loadOptions);
//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().get(0);
//Auto row fit
worksheet.autoFitRows();
//Auto column fit
worksheet.autoFitColumns();
workbook.save(myFileName, SaveFormat.XLSX);
It works on JDK 1.7 for windows, but it seems it doesn't work on JDK1.7 for Ubuntu 12.04 LTS.
I've attached input and output files.
Kind regards,
Leo.