Export csv and xl is exporting only page 1 data. I need all data
Export csv and xl is exporting only page 1 data. I need all data
This is my button code :: please help
// Download Button
var table = $('#user_data').DataTable();
var buttons = new $.fn.dataTable.Buttons(table, {
buttons: [
// 'excelHtml5',
// 'csvHtml5'
{
extend: 'excelHtml5',
footer: false,
exportOptions: {
columns: [0,1,2,3,4,5,7,8,9,10]
}
},
{
extend: 'csvHtml5',
footer: false,
exportOptions: {
columns: [0,1,2,3,4,5,7,8,9,10]
}
}
]
}).container().appendTo($('#buttons'));
//
Replies
Are you using server side processing? If so take a look at this FAQ.
Kevin
Hello,
My Table data is coming form server side . but for excport i just using button.Please help
Hi @taslim12 ,
As the FAQ that Kevin sent shows, if you're using
serverSide
, then the client only has access to the data on the current page. Therefore, you'll need to use a server script to create the XLS. There's a few other threads in this forum discussing that - it would be worth searching for those.Cheers,
Colin