How to control which columns are exported to excel
How to control which columns are exported to excel
I'm using DataTables buttons extension that are found here https://datatables.net/extensions/buttons/ to export my table results to excel.
Is there away i can specify explicitly the columns that should be exported. I want to do this because i have other columns that just contain buttons and icons, so i would not want to export those.
Below is the code snippet i'm using.
var oTable = $('#myTable').DataTable({
buttons: ['excel'],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [{ "bSortable": false, "aTargets": arr}],
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
});
oTable.buttons().container().insertAfter('#myTable_filter');
Secondly, how do i modify the above snippet such that it insets the export button after the search textbox?