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

Free Support Forum - aspose.com

The function ISERROR does not work as expected when part of array formula

Hi,

Attached you will find a template spreadsheet. (The sheet Test is the one used.)

When A2 is > 0.5 then values in D column is set to 1 and the formula in F column is ok
When A2 is <= 0.5 then values in D column is set to 0 and the formula in F gets errors as expected.

The cell I3 is supposed to indicate if there is any erros for column F.

In Excel this is reported as expected (cell I3 and I6) but the output from Aspose is not.

Output from sample program:
------------------------------------
Aspose version : 2.1.2.0
Setting A2 to 0.7
I6: Expected value in I3: 0; Actual value in I3: 0
Setting A2 to 0.3
I6: Expected value in I3: 1; Actual value in I3: 0



Sample program:
------------------------------------
import java.io.FileInputStream;
import java.io.IOException;

import com.aspose.cells.AsposeLicenseException;
import com.aspose.cells.Cells;
import com.aspose.cells.CellsHelper;
import com.aspose.cells.License;
import com.aspose.cells.Workbook;

public class IsErrorTest {

public static void main(String[] args) throws IOException, AsposeLicenseException {

License lic = new License();
lic.setLicense(new FileInputStream(“lib/Aspose.Cells.lic”));

System.out.println("Aspose version : " + CellsHelper.getReleaseVersion());

Workbook workbook = new Workbook();

workbook.open(“Excel/isError.xls”);

Cells cells = workbook.getWorksheets().getSheet(“Test”).getCells();

System.out.println(“Setting A2 to 0.7”);
cells.getCell(“A2”).setValue(0.7);

workbook.calculateFormula();

System.out.println(“I6: " + cells.getCell(“I6”).getStringValue()+”\t ");

System.out.println(“Setting A2 to 0.3”);
cells.getCell(“A2”).setValue(0.3);

workbook.calculateFormula();

System.out.println(“I6: " + cells.getCell(“I6”).getStringValue()+”\t ");
}
}



Egil

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We have found your mentioned issue after an initial test. We will look into it and get back to you soon. Your issue has been registered in our internal issue tracking system with issue id: CELLSJAVA-15300.

Thank You & Best Regards,

Hi,

Please try the attached latest version of Aspose.Cells. We have fixed the issue of calculating ISERROR formula.

Thank You & Best Regards,

It solves the problem - thank you

The issues you have found earlier (filed as 15300) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

This issue is not solved for Aspose version : 7.0.2.0

Output of sample program:
---------------------------------

Aspose version : 7.0.2.0
Setting A2 to 0.7
I6: Expected value in I3: 0; Actual value in I3: 0
Setting A2 to 0.3
I6: Expected value in I3: 1; Actual value in I3: 0



Sample program converted to new API:
---------------------------------------------------------------
package com.ec.frmw.test.aspose;
import java.io.FileInputStream;
import java.io.IOException;

import com.aspose.cells.Cells;
import com.aspose.cells.CellsHelper;
import com.aspose.cells.License;
import com.aspose.cells.Workbook;

public class IsErrorTest {

public static void main(String[] args) throws IOException, Exception {

License lic = new License();
lic.setLicense(new FileInputStream(“lib/Aspose.Cells.lic”));

System.out.println("Aspose version : " + CellsHelper.getVersion());

Workbook workbook = new Workbook(“Excel/isError.xls”);

Cells cells = workbook.getWorksheets().get(“Test”).getCells();

System.out.println(“Setting A2 to 0.7”);
cells.get(“A2”).setValue(0.7);

workbook.calculateFormula();

System.out.println(“I6: " + cells.get(“I6”).getStringValue()+”\t ");

System.out.println(“Setting A2 to 0.3”);
cells.get(“A2”).setValue(0.3);

workbook.calculateFormula();

System.out.println(“I6: " + cells.get(“I6”).getStringValue()+”\t ");

}

}

Hi,


After an initial test, I can find the issue using your sample code and template file. I have logged a ticket with an id: CELLSJAVA-40049. We will look into your issue to figure it out soon.

Thank you.
Hi,

Please try the attached version/fix: v7.0.3.3.

We have fixed the issue.


Thank you.

It works, thank you

The issues you have found earlier (filed as CELLSJAVA-40049) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.