LocalDate is always parsed to current date
ankit030287 opened this issue · comments
Hi,
This is the part of my model
@ExcelCellName("StartDate")
private LocalDate startDate;
This is how I am using it
PoijiOptions options = PoijiOptionsBuilder.settings()
.datePattern("dd/MM/yyyy")
.sheetIndex(sheetIndex)
.build();
try {
return Poiji.fromExcel(inputStream, PoijiExcelType.XLSX, clazz, options);
}
All the fields are correctly parsed but the startDate field is always getting parsed to current date. Attaching the screenshot for excel file
Am I missing anything?
Thank you for contributing to Poiji! Feel free to create a PR If you want to contribute directly :)
Found out that its the duplicate of #166 so closing tis
Would it be possible to not use current date by default as it will lead to issues we won't know?
Hi, I had the same issue at first because the Excel date format was not what it looked like (it's not what's written in the formula bar).
In your Excel sheet, check the cell format for a StartDate field and specify that date format in the Poiji Options
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.