Error with cell references to another sheet

I’m currently evaluating Aspose Cells .NET and I’m seeing a problem when converting a workbook to HTML.

I’ve attached the workbook and the resulting HTML file. On the “Year” sheet of the workbook there are a number of formulas that reference values on other sheets. When I save it to HTML with Aspose all of the values appear as 0’s. When I save it to HTML with Excel I see the values. Is this not supported? Please let me know.

Hi Dan,

Thank you for contacting Aspose support.

Please call the Workbook,CalculateFormula method before saving the spreadsheet in HTML format. The aforesaid method will force the Aspose.Cells API to re-calculate all the formula based values, and consequently correct values will be rendered in HTML.


var book = new Workbook(“D:/temp/FlowSummary.xlsx”);
book.Save(“D:/temp/output.html”, SaveFormat.Html);

Hi Babar,

Thanks for the response!

Calling CalculateFormula works, but I don’t understand why it’s necessary. All of the numbers on the left side of the “Year” spreadsheet are also formulas, but they are calculated without calling CalculateFormula. I don’t understand why the formulas on the left are treated differently.

Hi Dan,

Thanks for your posting and using Aspose.Cells.

Whenever, there are some formulas, Aspose.Cells needs user to call Workbook.CalculateFormula() to get the updated and correct calculated values of formulas.

If you will not call it, then Aspose.Cells will retrieve the values stored in Excel files which are not always correct or updated. These retrieved values are sometime correct and sometime these are wrong, therefore it is always necessary to call Workbook.CalculateFormula() to get the correct calculated values.