Hi- I have a complicated workbook available at the link I share below. When I call the code below to calculate the workbook I am finding a very clear incorrect result in cell P1_xReturns_MS!C76. The Aspose.Cells calculation results in an incorrect value of 0.00% while Excel correctly calculates the cell to be 35.00%.
Here’s the simple code used to calculate the workbook. I am using Aspose.Cells 25.6:
Aspose.Cells.Workbook wbk = new Aspose.Cells.Workbook(<Enter path and filename>);
wbk.Settings.FormulaSettings.EnableCalculationChain = true;
Aspose.Cells.CalculationOptions AsposeCalculationOptions = new Aspose.Cells.CalculationOptions()
{
Recursive = true,
IgnoreError = false,
};
wbk.RefreshDynamicArrayFormulas(true, AsposeCalculationOptions);
wbk.CalculateFormula(AsposeCalculationOptions);
Here’s a link to my file: https://drive.google.com/file/d/1LlfI-iBzHwoswA78ozkhthi0V-W0oNsP/view?usp=sharing
Please confirm that you’re also getting the incorrect result and review for a potential bug.
Note, if I don’t include the EnableCalculationChain = true line, this calculation error does not occur. However, I am re-using this workbook for multiple calculations and want to use this option. The bug appears to be in the calculation chain.
@mattgabriel,
Thanks for the template XLSM file and details.
I tested your scenario/case and was able reproduce the issue as you mentioned by using your template XLSM file and following sample code snippet. I found incorrect workbook (formula) calculations when EnableCalculationChain = true. If I don’t enable the formulas calculation chain, it works fine.
Aspose.Cells.Workbook wbk = new Aspose.Cells.Workbook("e:\\test2\\Swift_v4_FAS_GDC_EBMS_v2_Azure20250718160737_NoFxact.xlsm");
// If I comment this line, the formula is calculated correctly
wbk.Settings.FormulaSettings.EnableCalculationChain = true;
Worksheet ws = wbk.Worksheets["P1_xReturns_MS"];
Aspose.Cells.Cell cell = ws.Cells["C76"];
Console.WriteLine(cell.StringValue);//35.00%
Aspose.Cells.CalculationOptions AsposeCalculationOptions = new Aspose.Cells.CalculationOptions()
{
Recursive = true,
IgnoreError = false,
};
wbk.RefreshDynamicArrayFormulas(true, AsposeCalculationOptions);
wbk.CalculateFormula(AsposeCalculationOptions);
Console.WriteLine(cell.StringValue);//0.00% - Not Ok
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-58792
Once we have an update on it, we will let you know here.
@mattgabriel,
We are pleased to inform you that your issue (Ticket ID: “CELLSNET-58792”) has been resolved now. The fix/enhancement will be included in Aspose.Cells v25.8, which we plan to release in the first half of August 2025. Please stay tuned and keep in touch.
@mattgabriel
The issue (filed as CELLSNET-58497) has been fixed in this update. Please try it.
@mattgabriel
The issues you have found earlier (filed as CELLSNET-58792) have been fixed in this update. Please take your time to try the v25.8 and let us know your feedback.