Custom Function dependencies

Issue: dependencies are not properly calculated. For instance, if cell A1=CustomFunction(A2) and A2 = CustomFunction(“abc”), then A1 is calculated before A2 and it is not resolved. It requires another call to CalculateFormula()

Discovered during upgrade from Aspose17 to Aspose 24.

@laurentiu2024,

How do you calculate the formula in A1 cell? Do you use Cell.Calculate() method? Could you please provide a sample test-case or simulation (runnable) code to reproduce the issue? Also, please zip and attach a sample Excel file. We will check your issue soon.

We are not using Cell.Calculate(). During the CalculateFormula(options) call we are now setting the data.CalculatedValue = and this resolved the issue.

@laurentiu2024
Thank you for your feedback. I’m glad your issue has been solved by setting data.CalculatedValue. If you have any questions, please feel free to contact us at any time. We are happy to provide support.