Print - All visible columns, except one

Print - All visible columns, except one

DigitalFusionDigitalFusion Posts: 10Questions: 5Answers: 1

How can I tell the datatable to print all columns that are visible, except one? The last column of my table includes buttons, and they do not need to be printed. I realize I could specify which columns to print, but since I am also using colVis, I would like the user to be able to choose which columns are printed.

"buttons": [
{
extend: 'collection',
text: '<i class="ico-file-download mr5"></i>Tools',
buttons: [
{ extend: 'csv', text: 'Export to CSV' },
{ extend: 'pdfHtml5', text: 'Create PDF', orientation: 'landscape', exportOptions: { columns: ':visible' } },
{ extend: 'print', text: 'Print', exportOptions:{columns: ':visible',autoPrint: true}}
]
},
{
extend: 'colvis',
text: '<i class="ico-eye mr5"></i>Toggle Columns',
}

           ]
This discussion has been closed.