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

Free Support Forum - aspose.com

Calculation formulas

Hello. We have found some error in calculations chains, but i unable to explain some reasons for this. I have prepared test, that repeated our case:


@Test
public void calculationChainTest() {
try {
Workbook wb = new Workbook(“D:\test.xlsx”);

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

wb.calculateFormula(true, new Resolver());

assertEquals(“resolve”, cells.get(“J18”).getDisplayStringValue());

} catch (Exception e) {
e.printStackTrace();
assertNull(e);
}
}

public class Resolver implements ICustomFunction {

@Override
public Object calculateCustomFunction(String s, ArrayList arrayList, ArrayList arrayList2) {
if (“usparentcell”.equals(s)){
return 4;
} else if (“ussqlfield”.equals(s)) {
return 4;
}
return null;
}
}

Can you please explain - what wrong in our temaplate or explain why i can’t receive a “resolve” in my chain.

Best regards. Alexey

Hi,


Thanks for the sample file and code segment.

After an initial test, I observed the issue as you mentioned. I got “#REF!” error while calculating the formulas using your sample code snippet (that implements the custom function) with your template file. We need to investigate your issue if there is some flaw in your code segment or it is a bug in the product. I have logged an investigation ticket with an id “CELLSJAVA-40781” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v8.0.0.2

We have fixed your issue now.

Let us know your feedback.

Thank you.

Thanks. It works now.


Best regards. Alexey

Hi,


Thanks for your feedback.

Good to know that your issue is resolved by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.