Free Support Forum - aspose.cloud

Using smartmarker in Cloud API


#1

Hi,


we are in the process of evaluating the Cloud API to see if it fits our needs.
We are trying to use the smartmarker capability, but it is not clear as to how to use it:
http://www.aspose.com/docs/display/cellscloud/Create+Excel+Workbook+from+a+SmartMarker+Template

We created an example that calls the https://api.aspose.com/v1.1/cells/genericTemplate.xlsx/smartmarker with the appSID and signature in POST where the body is an XML representing the information (see both attached).

In the response we get:
{“Version”:{“Major”:1,“Minor”:1,“Build”:-1,“Revision”:-1,“MajorRevision”:-1,“MinorRevision”:-1},“Content”:{“Headers”:[{“Key”:“Content-Type”,“Value”:[“application/vnd.ms-excel”]}]},“StatusCode”:200,“ReasonPhrase”:“OK”,“Headers”:[],“RequestMessage”:null,“IsSuccessStatusCode”:true}

and there is no file created.
How can we get the created excel file?

Thanks,
Yisha

#2

Hi,


there differences in the documentation of this functionality.
In java/.net the documentation is to use something like:
http://api.saaspose.com/v1.0/cells/input.xls?templatefile=template.xls

In the cloud REST API the documentation is to use something like:
~/{file-name}/smartmarker?xmlFile={xml-file}
What’s the correct way?
Should we use the first URL with the XML as the body of the message?

Thanks,
Yishay

#3

Hi Yishay,

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

Please see the help relating to all REST URIs from the following link.

( http://api.aspose.com/v1.1/help )

and this is the help of Smart Marker related URI

( http://api.aspose.com/v1.1/Help/Api/POST-cells-name-smartmarker_appSid_xmlFile_storage_folder_outPath )

The smart marker URI is

POST
cells/{name}/smartmarker?appSid={appSid}&xmlFile={xmlFile}&storage={storage}&folder={folder}&outPath={outPath}
Smart marker processing result.

It expect xml file path in the URI itself and it means xml file itself be inside the storage space.


#4

Hi Shakeel,


Thanks for the quick response.
Here the documentation specify that the XML can be included in the POST body.
Is that incorrect?

In the link you sent, “outPath” should be the full name including the target full path and target file name?

Thanks,
Yishay

#5

Hi Yishay,

Both approaches are right, if you will not specify the xml file path, then you will have to specify it inside the body.

This documentation article shows it how to make use of this API. In this article, you will also be able to download the Designer Spreadsheet and see the XML used to specify data.

( http://www.aspose.com/docs/display/cellscloud/smartMarker )