We are receiving unexpected results when using a custom date format in German.
System setup:
- Windows settings, go to Clock, Languages and Region and then Region
- Formats Tab: Format is “German (Germany)”
- Location Tab: Home location is “Germany”
Launch Excel
- Select a cell and set formatting to Custom and Type is: TT.MM.JJ
- Now in the cell type 20.12.2018
Note that after hitting enter it is correct in Excel
The following code shows the issue we are seeing.
Workbook excel = new Workbook(C:\\aspose-test\\german_date.xlsx");
try {
Cells cells = excel.getWorksheets().get(0).getCells();
Cell cell = cells.get(0, 0);
System.out.println(cell.getDisplayStringValue());
System.out.println(cell.getStringValue());
System.out.println(cell.getStyle().getCustom());
…
The first two provide what I expect, but the last does not. The following is the resulting data that I receive:
20.10.19
20.10.19
dd/mm/yy
Please let me know if you feel I am doing something wrong or if there might be an issue. Thank you!