StackOverflowException when calling Worksheet.CalculateFormula

Hi,

On the attached files we encounter StackOverflowException when calling Workbook.CalculateFormula or Worksheet.CalculateFormula on some of the worksheets.

The code for reproducing the issue is:

var workbook = new Workbook(“c:\File1.xls”);
foreach (var worksheet in workbook.Worksheets)
{
worksheet.CalculateFormula(true, false, null);
}
workbook.CalculateFormula();

Thank you,
Aurelian Iordache
Software Developer
IBM Romania

Hi,


Thanks for providing us template file and sample code.

After an initial test, I observed the issue as you mentioned by using your sample code with your template file(s). I got: StackOverflowException error on Worksheet.CalculateFormula and Workbook.CalculateFormula() methods.
e.g
Sample code:

var workbook = new Workbook(“e:\test2\File1.xls”);
foreach (Worksheet worksheet in workbook.Worksheets)
{
worksheet.CalculateFormula(true, false, null);
}
workbook.CalculateFormula();

I have logged a ticket with an id “CELLSNET-42724” for your issue. We will look into it soon.

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

Thank you.

Hi,


We have evaluated your issue further. For Workbook.CalculateFormula(), please use a smaller StackSize for calculations, it will work fine:
e.g
Sample code:
var workbook = new Workbook(“e:\test2\File1.xls”);
workbook.Settings.CalcStackSize = 200;
workbook.CalculateFormula();

And for Worksheet.CalculateFormula(), we will enable the StackSize option in the next fix soon.

Thank you.

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


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