Showing results for 
Search instead for 
Do you mean 
Reply

SOA ExportToApplication, The generated xlsm file can not be opened

[ Edited ]

FileImportExportService feService = FileImportExportService.getService(Session.getConnection());
ExportToApplicationInputData[] input = new ExportToApplicationInputData[1];
input[0] = new ExportToApplicationInputData();
input[0].ApplicationFormat = "MSExcel";
input[0].ObjectsToExport = list;
input[0].AttributesToExport = new string[] { "object_string" };
input[0].TemplateId = null;
ExportToApplicationResponse resp = feService.ExportToApplication(input);
string[] tickets = resp.TransientFileReadTickets; //the tickets is not null
if (tickets!=null)
{
Console.WriteLine(tickets[0]);
FileManagementUtility fms = new FileManagementUtility(Session.getConnection());
fms.GetTransientFile(tickets[0], "c:\\test.xlsm");// The generated xls file can not be opened
Console.ReadLine();
}

I would like to export the object through the “ExportToApplication” and “GetTransientFile” , but the distortion of the generated documents,.

Please help me!!!

微信截图_20161018235108.png