Workbook CalculateFormula ArgumentOutOfRangeException

Hi there,

We’re seeing an ArgumentOutOfRangeException thrown when calling CalculateFormula on the attached sheet.

The following code:

Workbook w = new Workbook(“Exception 1.xlsx”);
w.CalculateFormula();

Causes the following exception:

ArgumentOutOfRangeException: Non-negative number required. Parameter name: length(Based on cell Data Health!G784)

It seems the problem was introduced in v20.8.0 - the last version the calculation works without an exception is v20.7.0.

Could someone investigate this for us?

Thanks

Exception 1.zip (683.1 KB)

We’ve come across another instance of this exception occurring, through I’m not certain it is the same problem as the last version this sheet calculates successfully in is v20.4.0, it is broken from v20.5.0 onwards.

Could you also investigate this exception for us?

Thanks

Exception 2.zip (872.5 KB)

@WaterOutlook,
Regarding the issue, “ArgumentOutOfRangeException: Non-negative number required” it is reproduced (for Exception 1.zip file) and logged into our database for further investigation and a fix. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNET-47703 - Exception raised while calling Workbook.CalculateFormula()

I have tried the second file Exception 2.zip also with the same code but no exception is raised with the latest version. Please ensure that you have shared the correct file and latest version is used for testing.

@WaterOutlook,

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-47703”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@WaterOutlook,

Please try our latest version/fix: Aspose.Cells for .NET v20.10.8 (attached)
Aspose.Cells20.10.8 For .Net2_AuthenticodeSigned.Zip (5.4 MB)
Aspose.Cells20.10.8 For .Net4.0.Zip (5.4 MB)

Your issue should be fixed in it.

Let us know your feedback.

Thanks for the prompt update, I can confirm this fixes the problem.

@WaterOutlook,

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.

The issues you have found earlier (filed as CELLSNET-47703) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao

We’ve encountered another problem in newer Aspose.Cells versions with the file in ‘Exception 2.zip’. Opening this file in v21.2 of Aspose.Cells or newer and calling CalculateFormula causes the following exception:

ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.(Based on cell B!E86)

This workbook previously calculated correctly from v20.10.8 to v21.1.

Could someone investigate this for us?

Thanks

@WaterOutlook,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-47975 - ArgumentException on CalculateFormula method

@WaterOutlook,
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@WaterOutlook,

Please try our latest fix v21.4.2:

Aspose.Cells21.4.2 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.4.2 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.4.2 For .NetStandard20.Zip (5.5 MB)

Your issue should be fixed in it.

Let us know your feedback.

Thanks, that has fixed the problem.

@WaterOutlook,
Good to know that your issue is sorted out. 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.

The issues you have found earlier (filed as CELLSNET-47975) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao