ExcelMapper: Convert double date values bug
When converting a cell double date value, the following code
should return DateTime.FromOADate(cell.NumericCellValue)
instead of cell.DateCellValue
. The return of cell.DateCellValue
causes an exception in the NPOI library. Here the Stack Trace:
Exception: Object reference not set to an instance of an object.
at NPOI.XSSF.UserModel.XSSFWorkbook.IsDate1904()
at NPOI.XSSF.UserModel.XSSFCell.get_DateCellValue()
at Ganss.Excel.ExcelMapper.GetCellValue(ICell cell, ColumnInfo targetColumn)
at Ganss.Excel.ExcelMapper.<Fetch>d__54.MoveNext()
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- Add workaround for #51 — committed to mganss/ExcelMapper by mganss 4 years ago
Thank you very much. That helps me a lot!