vignesh vignesh - 1 year ago 91
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

Answer Source

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

initComplete: function() {

forked fiddle (not intentionally) ->

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download