Unable to open the Export to Excel report in xlsx format
Hi,
I need to export the data from repeat grid to an excel(.xlsx). Able to export the data, but unable to open the same as i am getting below error while opening the excel(.xlsx) file.
"Excel cannot open the file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."
Here is the code snippet.
ClipboardPage objHeadersPage = tools.findPage("pxRequestor").getProperty(".pyHTTPResponseHeaders").getPageValue();
objHeadersPage.putString("contentType" ,"application/vnd.ms-excel");
objHeadersPage.putString("ContentDisposition" ,"attachment;filename= ARWorksheet.xlsx");
Calling a HTML stream rule to display the data.
Please note that it is working fine when i give the format as xls and not working for xlsx.
Please let me know if i am missing anything here.
Thank you.
***Edited by Moderator Marissa to update platform capability tags****