@cgkrish,
Please notice, I am able to reproduce the issue as you mentioned by using the following sample code with a simple template file (attached). I found power operator “^” is not working for formula calculations in Aspose.Cells for Java:
e.g.
Sample code:
Workbook workbook = new Workbook(“E:\test2\Bk_poweroperator1.xlsx”);
workbook.calculateFormula();
Cell cell = workbook.getWorksheets().get(0).getCells().get("A1");
String cellValue = cell.getValue().toString();
String CellValue2 = cell.getStringValue();
System.out.println(cellValue);//#NUM! //Error
System.out.println(CellValue2);//#NUM!//Error
cell = workbook.getWorksheets().get(0).getCells().get("A2");
cellValue = cell.getValue().toString();
CellValue2 = cell.getStringValue();
System.out.println(cellValue);//-3.0
System.out.println(CellValue2);//-3
I have logged a ticket with an id “CELLSJAVA-43583” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.
files1.zip (5.2 KB)