Infinite Calc Loop

Hello,

I have an interesting one for you. The attached workbook will never finish calculating using:
(new Workbook(file)).CalculateFormula();

The formulas in the workbook are a bit complex, but I’ve whittled it down to a small set while still reproducing the issue.

Removing the SUMIF in cell C1 or the value in D4 will cause the issue not to occur.
Deleting the blank rows 2 or 3 will cause the issue not to occur.
And Any changes to Column A’s Exclusions or Ranking will cause the issue not to occur.

If you can reproduce and fix I would be very interested in what the root cause was. It’s very difficult to pin it down on a single item, but the problem seems like an indirect circular reference of sorts.

InfiniteCalc.zip (44.2 KB)

Thank You,
-Andy

@weissa,

Thanks for the template file

Which version of Aspose.Cells for .NET you are using? I tested with your file using latest version/hotfix: Aspose.Cells for .NET v22.10.1 (Download | NuGet) and following sample code, it works fine and formula calculations are done efficiently.
e.g.
Sample code:

string file = "e:\\test2\\InfiniteCalc.xlsx";
(new Workbook(file)).CalculateFormula();

Please try using latest version and let us know if you still find the issue.

@Amjad_Sahi,

I can confirm that the issue occurs in 22.6.1 but does not in the latest 22.10.1.
We’ll upgrade.

Thank You,
-Andy

@weissa,

Thanks for your feedback.

Good to know that the latest version fixes your issue. 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.