From Api:
$('#myTable').DataTable( {
buttons: {
buttons: [
{
text: 'Alert',
action: function ( e, dt, node, config ) {
config.title ="dynamic title"
}
}
]
}
} );
This is changing the title, but export is not working now. Any suggestion or workaround will help.
See https://datatables.net/forums/discussion/33209/run-script-before-exporting-begins-buttons-plugin You need to call the original action programmatically. Small example :
Will produce a
qwerty.xslx
see -> https://jsfiddle.net/2ez9mxop/2