Free Support Forum - aspose.com

Date detected as Integer

Date value 4.8.16 is detected as Integer.


I have attached the sample spreadsheet.

Hi,


Thanks for your posting and using Aspose.Cells for Java.

It is working fine. Please try the latest version: Aspose.Cells for Java 16.11.0 with the following sample code. I have also shown its console output for your reference.

Java
Workbook workbook = new Workbook(dirPath + “DateValues.xlsx”);

Worksheet ws = workbook.getWorksheets().get(0);

Cell cell = ws.getCells().get(“E3”);

if(cell.getType() == CellValueType.IS_DATE_TIME)
{
System.out.println("Its date value: " + cell.getStringValue());
}

Console Output
Its date value: 4.8.16