I am using Aspose.cells in my company, one of ours needs is to use excel template file which contains array formulas. By writting data using Aspose and without calcute formulas with it, calculations perform well at the file opening; but the problem is, I want to save the file in pdf format, and I have this error
Error in calculating cell [[2]Feuil3!A1]: IndexOutOfRangeException
Please download and try the latest version: Aspose.Cells for .NET v8.8.0.2 and see if it makes any difference and resolves your issue.
If your issue still occurs with the latest version, then please provide us your sample code and source/template excel file which you are converting to Pdf and contains your mentioned formula. We will look into it and update you asap.
You can try without CalculateFormula method and change the output format to .xlsx, you’ll have no error and calculation will be done at the file opening with MS Excel.
We were able to observe this issue by using your template file and sample code. We have tested this issue with the latest version: Aspose.Cells for .NET v8.8.0.3 but it also generates exception on Workbook.CalculateFormula() method.
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-44430 - Error occurs while performing complex calculations
I have also showed the stack trace of the generated exception for a reference.
Exception:
Aspose.Cells.CellsException was unhandled HResult=-2146232832 Message=Error in calculating cell [[0]Feuil2!A5]: IndexOutOfRangeException: Index was outside the bounds of the array. Source=Aspose.Cells StackTrace: at . ( ) at Aspose.Cells.Workbook.CalculateFormula(CalculationOptions options) at Aspose.Cells.Workbook.CalculateFormula(Boolean ignoreError, ICustomFunction customFunction) at Aspose.Cells.Workbook.CalculateFormula() at CellsNET.Program.f1() in d:\Aspose\Projects\NET\AsposeProject\CellsNET\Program.cs:line 103 at CellsNET.Program.Main(String[] args) in d:\Aspose\Projects\NET\AsposeProject\CellsNET\Program.cs:line 30 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:
This is to inform you that we have fixed your issue CELLSNET-44430 now. We will soon provide the fix after performing QA and including other enhancements and fixes.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.