Convert Spreadsheet to PDF with Aspose.Cells REST API and Download result file from cloud storage

Hi,

I am new to aspose.cloud, is there any way to call a api method and download the xlsx file or pdf file generated after conversion to the format?

when url is build like this :

http://api.aspose.com/v1.1/cells/Employee_Sales_Summary_2008R2.xlsx with my apikey and SID.

i am getting 403 forbidden error.

Thanks,

Amey Sawant

Hi,

Well, you got to write your own code to response the output file stream by yourselves. I have attached a sample project for your reference. You need to first login into your cloud space (https://www.aspose.cloud/) and then upload your input XLS/XLSX file at your clould storage. Open the attached project and specify/update your app sid, app key and update URI with other parameter (accordingly for your needs) in the code and re-save the project and then run it.

Hope, this helps a bit.

Thank you.

Hi,


I tried the project what is attached when i run the project i m getting “The remote server returned an error: (500) Internal Server Error.” my url is :http://api.aspose.cloud/v1.1/cells/table2excel.xlsx/saveAs?newfilename=out1Book1.pdf&isAutoFitRows=true i have a folder created on the cloud as “FirstFolder” in that folder i have this file “table2excel.xlsx” and i want to work with this file. Also, is there any way to tack down the requests made to the file/app which is there on cloud? so that i can check and log the errors caused.

Thanks,
Amey Sawant

Hi,


Well, we have a folder parameter for all Cloud APIs. If you create a new folder and upload file(s) to that folder, then you should pass the folder name/path to folder parameter, e.g MainFolder/SubFolder.

So, you should update your URI like following:
http://api.aspose.cloud/v1.1/cells/table2excel.xlsx/saveAs?folder=FirstFolder&newfilename=out1Book1.pdf&isAutoFitRows=true

Also, see the resource document for your reference:
Aspose.Cells Cloud - API References
Thank you.

Hi,


Thanks for the reply, i tried with the folder parameter still getting same error “500 internal server error” is there any other way to tack or log the errors?

Thanks,
Amey Sawant

Hi,


As per “500 internal server error” denotes and it looks like your URI is not correct (your URI cannot find the underlying file/folder), kindly double check and try to figure it out on your end. Could you also paste your URI and attach your template Excel file here, we will test it on our end.

And, see the documents on Cloud APIs usage and server logs for your reference:
http://www.aspose.com/docs/display/totalcloud/Methods+to+Work+with+API+Usage+and+Logs

Thank you.