I'm getting a java.lang.IllegalStateException under this very specific environment:
- Java SE 6u45
- Control Panel -> Region and Language -> set Format to "French (France)"
- A time.txt file containing only "11/10/2014 11:03:34" and CR+LF at the end
- Aspose.Cells for Java 8.2.2
- Windows 7
Code to reproduce issue:
final Locale locale = new Locale("en", "US");
final Workbook workbook = new Workbook();
workbook.getSettings().setLocale(locale);
final Worksheet sheet = workbook.getWorksheets().get(0);
final Cells cells = sheet.getCells();
final TxtLoadOptions options = new TxtLoadOptions();
options.setLocale(locale);
cells.importCSV(“C:\Temp\time.txt”, options, 0, 0);
|
|
Expected output:
No errors; program terminates normally.
Actual output:
Exception in thread “main” java.lang.IllegalStateException: Parse double exception: illegal string format
at com.aspose.cells.b.a.zo.a(Unknown Source)
at com.aspose.cells.b.a.zo.a(Unknown Source)
at com.aspose.cells.zanr.a(Unknown Source)
at com.aspose.cells.zbiq.a(Unknown Source)
at com.aspose.cells.zbiq.b(Unknown Source)
at com.aspose.cells.zbiq.a(Unknown Source)
at com.aspose.cells.zbiq.a(Unknown Source)
at com.aspose.cells.Cells.importCSV(Unknown Source)
at asposetest.AsposeTest.main(AsposeTest.java:40)
Other observations:
- Also reproducible when Windows Region and Language Format is set to "Finnish (Finland)"
- Works fine when Windows Region and Language Format is set to “English (United States)”
- Works fine with JRE 7 and 8
Please advise.