We have a problem reading a CSV file with DateTime columns in it (see attached file).
Hi Wim,
Thanks for your posting and using Aspose.Cells.
I have tested this issue with the latest version: Aspose.Cells
for Java v7.7.2.3 and found that Aspose.Cells recognizes both type of values e.g 23-01-2013 and 01-23-2013 as dates. The first value will is treated as dd-mm-yyyy and second value is treated as mm-dd-yyyy.
So locale or regional setting does not have any effect. Could you please test your issue with the above version and let us know your run results.
Java
String filePath = “F:\Shak-Data-RW\Downloads\datetime.csv”;
TxtLoadOptions options = new TxtLoadOptions(LoadFormat.CSV);
options.setLocale( new Locale(“nl”, “NL”) );
options.setRegion( CountryCode.NETHERLANDS );
options.setEncoding( Encoding.getUTF8() );
Workbook workbook = new Workbook( filePath );
Worksheet worksheet = workbook.getWorksheets().get(0);
Cell cellA1 = worksheet.getCells().get(“A1”);
Cell cellB1 = worksheet.getCells().get(“B1”);
Cell cellC1 = worksheet.getCells().get(“C1”);
Cell cellD1 = worksheet.getCells().get(“D1”);
System.out.println(cellA1.getType()==CellValueType.IS_DATE_TIME);
System.out.println(cellB1.getType()==CellValueType.IS_DATE_TIME);
System.out.println(cellC1.getType()==CellValueType.IS_DATE_TIME);
System.out.println(cellD1.getType()==CellValueType.IS_DATE_TIME);
workbook.save(filePath + “.out.xlsx”);
Hi Wim,
Thanks for using Aspose.Cells.
We have looked into this issue further and found issue about reading datetime value with nl_NL locale.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40757.
Hi Wim,
Thanks for using Aspose.Cells.
We have fixed the issue of reading datetime in csv with nl_NL locale.
Please download and use the latest version: Aspose.Cells
for Java v7.7.2.4 now.
Hi,
Hi,
The issues you have found earlier (filed as CELLSJAVA-40757) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.