At Willis Towers Watson, we are using Aspose.Cells 24.7 and are considering upgrading to the current version, 25.4. In testing 25.4, we encountered a problem where some of the cells in the workbook do not get calculated. This does not happen using 24.7. We have confirmed that the numbers produced by 24.7 are correct, i.e. they match what Microsoft Excel would produce. Using 25.4, however, they are all zero.
Please see the attached AsposeCells25.4Bug.zip file. It contains a test case (a workbook and a Visual Studio solution) in which this problem is easily reproduced. There is also a README.txt file that provides information on the test case.
Thanks!
Ray Lee
AsposeCells25.4Bug.zip (169.1 KB)
@RaymondLeeWTW
It seems you are experiencing issues with cell calculations when upgrading from Aspose.Cells version 24.7 to 25.4. This is a known concern that can arise due to changes in how formulas are handled between versions.
To troubleshoot this issue, you can try the following steps:
-
Enable Calculation Chain: Ensure that the calculation chain is enabled in your workbook settings. You can do this by setting the EnableCalculationChain
property to true
. This allows the library to properly calculate dependent formulas.
Here is a code snippet demonstrating how to enable the calculation chain and calculate formulas:
Workbook workbook = new Workbook("path/to/your/workbook.xlsx");
workbook.getSettings().getFormulaSettings().setEnableCalculationChain(true);
workbook.calculateFormula();
-
Recalculate Formulas: After making any changes to the data that formulas depend on, make sure to recalculate the formulas again. This can be done by calling the calculateFormula()
method on the workbook.
-
Check for Formula Errors: If certain cells are returning zero, check if there are any errors in the formulas themselves. Sometimes, formulas may not calculate correctly due to references to empty cells or incorrect formula syntax.
-
Review Documentation: It may also be helpful to review the Aspose.Cells documentation for any changes in formula handling between versions. This can provide insights into any new features or changes that might affect your calculations.
If the problem persists after trying these steps, consider reaching out to Aspose support with your specific test case, as you have already done, to get more tailored assistance.
Feel free to share any additional details or specific formulas that are causing issues, and I can help further!
Sources:
I have tried enabling calculation chain and it did not help.
Yes I am calling calculateFormula() to recalculate formulas. Please see the code I uploaded.
I have reviewed documentation and found no information regarding the difference in behavior between 24.7 and 25.4.
This is of great importance to multiple project teams here at Willis Towers Watson. Your attention to this matter is greatly appreciated.
@RaymondLeeWTW,
Thanks for the template Excel file and sample app.
After initial testing, I am able to reproduce the issue as you mentioned by using your template Excel file and sample app. I found some cells are not getting calculated using Aspose.Cells v25.4. I even tried to refresh dynamic array formulas using Workbook.RefreshDynamicArrayFormulas() method before Workbook.CalculateFormula() method, but to no avail.
We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-58380
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@RaymondLeeWTW,
We are pleased to inform you that your issue (Ticket ID: “CELLSNET-58380”) has been resolved. The fix/enhancement will be included in our upcoming release (Aspose.Cells v25.6) that we plan to release in the first half of June 2025. You will be notified when the next version is published.
Thank you for your swift response!
@RaymondLeeWTW,
You are welcome. We will keep you posted with updates on new version (once available).
The issues you have found earlier (filed as CELLSNET-58380) have been fixed in this update. This message was posted using Bugs notification tool by leoluo
1 Like