Datatable data not getting written to excel file

Datatable data not getting written to excel file

vbjoe13vbjoe13 Posts: 13Questions: 4Answers: 0

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?

Answers

  • vbjoe13vbjoe13 Posts: 13Questions: 4Answers: 0

    Also to add, When clicked on PDF button, only 50% data by width gets written to PDF file and rest of the 50% data doesnt get printed. Meaning, the screen is getting cut vertically 50% by 50% width and only left side data is getting printed in pdf.

  • kunalgkunalg Posts: 1Questions: 0Answers: 0

    Hi vbjoe13 , did you get a solution for this, I am getting the same problem

  • vbjoe13vbjoe13 Posts: 13Questions: 4Answers: 0

    Excel file issue is resolved but they have not yet released the latest versions in CDN. You can refer the answer/workaround in the below thread.

    https://datatables.net/forums/discussion/31777/multiple-tables-with-pdf-buttons

    No resolution on pdf printing issue yet.

This discussion has been closed.