Hi All,
I want to export grid view data present in SharePoint 2013 application page to .XLSX file format (not .XLS format). I followed the below link:
http://www.aspsnippets.com/Articles/Solution-ASPNet-GridView-Export-to-Excel-The-file-you-are-trying-to-open-is-in-a-different-format-than-specified-by-the-file-extension.aspx
The above demo sample is working fine in ASP.Net but when I copy the code in Application Page of SharePoint 2013 and when I click button to Export I get application error as below
Please help me to export the data to .XLSX file.
Thanks & Regards
Avinash.
Avinash