Free Support Forum - aspose.cloud

How to recalculate / refresh the formulas in Microsoft Spreadsheet with Aspose.Cells REST API

Hi! I’m using Cells for Cloud and trying to update some cells in a workbook, recalculate the workbook, then convert it to a pdf. I’m able to update cells and convert to pdf, but I can’t figure out how to recalculate the workbook… it still shows the old formula results.


I’ve tried using the /saveAs endpoint and sending the following xml as the POST body:

True

…but it doesn’t seem to have any effect. (I’m not sure it’s even reading the options – I tried sending deliberately malformed XML to see if I could get an error message, but it returned a 200 okay response and saved the pdf).

Any ideas on how to do this?

Thanks,

Josh

Hi Josh,

Thanks for your posting and using Aspose.Cells.

You can calculate the formulas of your workbook using the following API method.

POST ​/cells​/{name}​/calculateformula

Calculate all formulas in workbook.

Here is a PHP code to calculate the formula of the workbook.

Thanks, Shakeel – this solved my problem!

Hi Josh,

Thanks for your feedback and using Aspose.Cells for Cloud.

It is good to know that your problem is resolved with the above URI suggestion. Let us know if you encounter any other issue, we will be glad to look into it and help you further.