I have a requirement to build a report from a SharePoint list and display the list items in a dynamic table on a page and then have a button that would export the dynamic table into Excel. I am using the below function which works fine, however, I am getting the error :
Html to excel file generation gives error file format and extension don't match. How to correct
Although I am able to open the xls file, I would like to get rid of the error. Any idea?
This is the function I am using:
$("#RptTable").table2excel({exclude: ".noExl",
name: "Worksheet Name",
filename: "StatusReport",
fileext: ".xls",
exclude_img: true,
exclude_links: true,
exclude_inputs: true
});
Thanks
faye fouladi