Buttons stuck on loading when I click on them... any reason why?
Buttons stuck on loading when I click on them... any reason why?
eilonash92
Posts: 5Questions: 2Answers: 0
When I click the button "Excel" for example, there are 2 arrows spinning like it's loading.
Although, it's stuck.. I tried a few times but nothing..
Any ideA?
$(document).ready( function () {
var table = $('#ServerTable').DataTable( {
"dom": 'B<"top"fi>rt',
buttons: [
'copy', 'excel'
],
"paging": false,
"columnDefs": [
{ targets: [0, 9], "orderable": false},
{
type: 'natural',
"searchable": true,
"orderable": true,
"targets": 1,
} ],
"order": [[ 1, 'asc' ]]
} );
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Start by checking your browser's console for Javascript errors.
Kevin
CSV and print worked well.
I think I will use them only.
But anyway, when I click and print and CSV it export and print all the colums in my table.
Is there a possible to print/export CSV only specific colums?
Did make sure to include the JSZip Javascript for Excel?
Here is an example:
https://datatables.net/extensions/buttons/examples/html5/columns.html
Kevin
Perfect.
The only thing left is when I click CSV it downloads a file CSV but without CSV exention...
So I need to rename the file after it downloaded to *.csv...
How do I make the file download the file with .csv?
Does the CSV button in this example add the .csv extension for you?
https://datatables.net/extensions/buttons/examples/initialisation/simple.html
It does for me using Chrome.
Kevin