Getting 504 error: Gateway Time-out | Aspose cells cloud not working as expected

Recently I tried to access the markdown api call, but it was getting 504 error. Now it works, but not as expected. It doesn’t write at the excel file with the xml data passed.

@developer.looplex
Please refer to the import data section and on the smart marker template section the online documentation and the code example below.

        string name = BOOK1;
        string xmlFile = "ReportData.xml";
        string folder = TEMPFOLDER;
        string outPath = null;
        UpdateDataFile(instance, folder, name);
        UpdateDataFile(instance, xmlFile);
        var response = instance.CellsWorkbookPostWorkbookGetSmartMarkerResult(name, xmlFile, folder, outPath);
        Assert.IsInstanceOf<System.IO.Stream>(response, "response is System.IO.Stream");
        const int row = 0;
        const int column = 0;
        var sb = new StringBuilder();
        sb.Append("<ImportBatchDataOption>");
        sb.AppendFormat("<DestinationWorksheet>{0}</DestinationWorksheet>", Sheet2);
        sb.AppendFormat("<IsInsert>{0}</IsInsert>", false ? "true" : "false");
        sb.Append("<BatchData>");
        for (var i = 0; i < 10; i++)
        {
            for (var j = 0; j < 10; j++)
            {
                sb.AppendFormat("<CellValue>");
                sb.AppendFormat("<rowIndex>{0}</rowIndex>", row + i);
                sb.AppendFormat("<columnIndex>{0}</columnIndex>", column + j);
                sb.AppendFormat("<type>{0}</type>", i % 3 == 0 ? "int" : "string");
                sb.AppendFormat("<value>{0}</value>", i + j);
                sb.AppendFormat("</CellValue>");
            }
        }
        sb.Append("</BatchData>");
        sb.Append("</ImportBatchDataOption>");
        string bodyParam = sb.ToString();
        Dictionary<string, string> headParams = null;
        Dictionary<string, object> formParams = null;
        var response = ApiInvoker.InvokeApiAsync<dynamic>(url, "POST", bodyParam, headParams, formParams, "application/xml").Result;
        Assert.AreEqual(HttpStatusCode.OK.ToString(), (string)response.Status.Value);

If they do not meet your needs, please describe your needs in detail, and we will evaluate whether they can be achieved for you as soon as possible.

I’m using this api call https://api.aspose.cloud/v3.0/cells/:name/smartmarker?folder=looplex.com.br/shared/template/&xmlFile=looplex.com.br/shared/template/Backup.xml and it doesn’t write on the xlsx wih the xml file…

@wangtao please help me

@developer.looplex,

Please refer to the image and code below.

const string name = Book1Xlsx;
const string xmlName = "ReportData.xml";
const string destServerFileName = "result.xls";
var destServerPath = string.Format("{0}/{1}", TempFolderPath, destServerFileName);
var xmlServerPath = string.Format("{0}/{1}", TempFolderPath, xmlName);
//POST http://api.saaspose.com/v1.0/Book1.xlsx/smartmarker?xmlFile=TempFolder/marker.xml
var url = BuildUrl(string.Format("{0}/smartmarker?folder={1}&outPath={2}&xmlFile={3}", name, TempFolderPath, destServerPath, xmlServerPath));
string bodyParam = null;
Dictionary<string, string> headParams = null;
Dictionary<string, object> formParams = null;
var response = ApiInvoker.InvokeApiAsync<dynamic>(url, "POST", bodyParam, headParams, formParams).Result;

How to design an XML data file and an Excel template file in detail?
Please refer to Smartly importing and placing data with Smart markers on the online cells development document.