I have created a button to export the form data to simple Excel. Everything is working file, even if i try to save this excel file in the file cabinet it gets saved correctly. But when i try to downlaod the excel file, downloads wierd single cell file with special characters or system gives either an error or saves an empty excel file. Can anyone help me in how to download the excel file from button click. I think i have issue in my responce.
My Code example is as follows:
.
.
.
xmlString += '</Table></Worksheet></Workbook>';// this is my xml string
var xlsFile = nlapiCreateFile('test.xls', 'EXCEL', nlapiEncrypt(xmlString, 'base64'));
response.writeFile(xmlFile);
}
error screenshot: