vignesh vignesh - 2 months ago 10x
jQuery Question

automatic export to excel using datatables

I am using jQuery datatable

The export to excel can be added by

paging: false,
columnDefs: [{
targets: 'no-sort',
orderable: false

But I want to download an excel file automatically when I initiate the

Is there an option to do that?
Here is a fiddle with export to excel working on click of excel button

I want it to happen automatically


You could click() the excel button in the initComplete callback :

initComplete: function() {

forked fiddle (not intentionally) ->