SANTOSHKY Member since 2013 3 posts
Posted: 2 years ago
Last activity: 2 years ago

Unable to open the Export to Excel report in xlsx format


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/");
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****

Low-Code App Development Reporting
Moderation Team has archived post
Share this page LinkedIn