Export all data to CSV file or Excel
Export all data to CSV file or Excel
dmnv
Posts: 1Questions: 1Answers: 0
Hi
I just want to export excel file with all records. when clicking the export button in datatable,
I try to use ajax call but its not working. while using server-side pagination.
,
'excelHtml5',
{
extend: 'csv',
text: 'Export',
action: function (e, dt, node, config) {
$.ajax({
"url": "/Report/GetPaySummary",
"method": "POST",
"accept": "application/json, text/javascript",
"contentType": "application/json; charset=utf-8",
"data": function (d) {
d.pageNumber = -1,
},
async: false
});
},
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
},
filename: function () { return "Pay Summary Report"; }
},
This discussion has been closed.
Answers
Hi,
Please see this FAQ:
Allan