String cannot be cast to java.lang.Double (110)

Hi,


After running the code below the following Exception is being thrown for the Cell AY51 when I try to get its Font: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double.
Can you please check this out?


Thanks,
Zeljko

Code:
String path = “/home/emisia/Desktop/Test.xlsx”;

Workbook workbook = new Workbook(path);

Cell cell = workbook.getWorksheets().get(0).getCells().get(“AW51”);


System.out.println(cell.getStringValue());

Font cellFont = cell.getDisplayStyle().getFont();

cell = workbook.getWorksheets().get(0).getCells().get(“AX51”);


System.out.println(cell.getStringValue());

cellFont = cell.getDisplayStyle().getFont();

cell = workbook.getWorksheets().get(0).getCells().get(“AY51”);


System.out.println(cell.getStringValue());

cellFont = cell.getDisplayStyle().getFont();


workbook.save("/home/emisia/Desktop/TestX.xlsx");

Hi Zeljko,


Thank you for contacting Aspose support.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for Java 8.8.2.5 and your exact code. I am afraid, we are not able to observe any exception. Please check the following console output and give the latest version (attached) a try on your end.

Console:
API Version: 8.8.2.5
JDK Version: 1.8.0_66

2055
2056
2057