var workbook = new Workbook("sample.xlsx");
workbook.CalculateFormula();
App stacks on CalculateFormula.
sample.xlsx is attached.
Hi,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue by testing your code with your sample excel file using the latest version:
Aspose.Cells for .NET v8.8.0.3. CalculateFormula lasts forever and does not complete.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-44432 - CalculateFormula lasts forever and does not complete
Hi,
We think your issue might be caused by StackOverflowException. Please try to set smaller CalcStackSize, it should work fine on your end as it works fine on our end:
e.g
Sample code:
var workbook = new Workbook(“e:\test2\sample.xlsx”);
CalculationOptions ccopts = new CalculationOptions();
ccopts.CalcStackSize = 20;
workbook.CalculateFormula(ccopts);
Let us know if you still have any issue.
Thank you.
It helped. Can i ask you what CalStackSize means? and what is measure for this ? mb? why 20 not 200? Thanks
Hi,
Good to know that it figures out your issue now.
Well, CalcStackSize attribute specifies the stack size for calculating cells recursively. The large value for
this size will give better performance when there are lots of cells need to be
calculated recursively. On the other hand, larger value might/will raise the risk of
StackOverflowException. In such case, if a user gets StackOverflowException when calculating
formulas, this value should be decreased accordingly.
Thank you.