Export to Excel: why is it empty?
Export to Excel: why is it empty?
les_stockton
Posts: 9Questions: 2Answers: 0
Why is my document empty, when I export to Excel from a table?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
Thanks,
Allan
Ok. here's a unstyled sample of what I'm trying to do. The export to Excel doesn't even work at this point, but the csv and the print do.
What am I doing wrong?
https://codepen.io/les_stockton/pen/vGdbVM
Ah - you are using the Flash buttons. I think unfortunately, that is a bug - Buttons is referring to an old version of the SWF file.
Could you try the following immediately before you initialise the DataTable (I couldn't see it in the pen):
Allan
I don't have to use the flash buttons. In fact, I would prefer not to.
Use the HTML5 buttons in that case. Don't include
buttons.flash.js
and do includebuttons.html5.js
.Allan
I'll try again, but the last time I didn't include the flash, the buttons disappeared.
I am including the html5 js.
I'll mess around with it some more.
You need to include the JSZip file if you want to use the Excel output. The DataTables downloader is the best way of making sure any dependencies are loaded.
Allan