Get filename for export (excelHtml5) from attribute table name
Get filename for export (excelHtml5) from attribute table name

buttons: [
{
extend: 'excelHtml5',
text: 'Экспорт в Excel',
filename: function () {
var tableName = //how catch attribute table.name???
//if i have many table on page!!!
//$('table.dataTable').DataTable(); -- my selectid
return tableName;
},
exportOptions: {
modifier: {
page: 'all'
}
},
className: 'btn btn-outline-success'
}
]
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
this is example on JSFiddler
https://jsfiddle.net/Taras_wind/fk7nzpsd/
You could do something like this: http://live.datatables.net/bavoguro/1/edit
It's not the particularly elegant, but it'll do the trick.
Colin
Colin, thank you very much!
this code working!
this code, working too!!!