Free Support Forum - aspose.cloud

Cells for Cloud: Recalculating a workbook


#1

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

#2

Hi Josh,

Thanks for your posting and using Aspose.Cells.

You can calculate the formulas of your workbook using the following URI.

http://api.aspose.com/v1.1/cells/YOUR_EXCEL_FILE/CalculateFormula

Suppose, your excel file name is “source.xlsx”, then the above URI will look like

http://api.aspose.com/v1.1/cells/source.xlsx/CalculateFormula

Here is a PHP code to calculate the formula of the workbook. It will give you idea how to write your code in other languages like C#, Java etc.

PHP


$strURI = “http://api.aspose.com/v1.1/cells/” . $workbookName . “/CalculateFormula”;

$signedURI = Utils::Sign($strURI);

$responseStream = Utils::processCommand($signedURI, “POST”, “”, “”);



#3

Thanks, Shakeel – this solved my problem!


#4

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.