I used this example https://datatables.net/extensions/buttons/examples/initialisation/export.html to implement in my project. And I was able to place the buttons on my page.
Sample data that i have on my datatable which is displayed on the screen has a XML file in string format like,
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:v4.context.vss.objects.bgc" xmlns:urn1="test"> <soapenv:Header>
Now, when i click on Excel button, it asks me to save the file, but when i open the file, it gives me an error below.
"We have found a problem with some content in .xlsx". Do you want us to try and recover as much as we can"
And when i open the file, nothing gets written to it.
I believe this could be because the data i have on the page. Can anyone please help?