We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose Cells in Java is causing formulas to appear as #NAME?

I have the following code, listed below, it seems like for some formulas, the result that appears in the cell when I open the XLS is #NAME?.. if I go to the cell, click fx then click the tick, it fixes this, but it’s a bit laborious to do this for each cell. Can you tell me what’s causing it?

Can’t aspose just accept it’s a formula and set it as a formula?

Is there any workaround?

I’m using Java Cells version 17.10

Here’s my code, I’ve attached the resultant file below.

public static void main(String[] args) throws Exception{
Workbook excel = new Workbook();

Cells cells = excel.getWorksheets().get(0).getCells();

Cell cell = cells.get(0, 0);


cell = cells.get(“B1”);


cell = cells.get(0, 2);


cell = cells.get(“D1”);

cell.setFormula("=B1 + C1");

Cell c1 = cells.get(“b2”);



Object v1=c1.getValue();

Cell c2 = cells.get(“b3”);

c2.setFormula("=SUM(AVERAGE(b1,c1), b1)");


Object v2=c2.getValue();

try {
    excel.save("numberone.xls", SaveFormat.XLSX);

catch(Exception ex){
String g=“error”;


numberone.xls.zip (6.6 KB)


Thanks for using Aspose APIs.

Please change the given line into this. i.e. remove dot from the formula name


and it will fix your issue.