Is it possible to exclude the first 3 coloums when exporting to pdf, csv, excel
Is it possible to exclude the first 3 coloums when exporting to pdf, csv, excel
I have a generic datatable structure that I use on 5 diff pages. All these tables do have a generic 3 columns with graphical icons, these are non sortable columns.
[code]
$('#myTable1').dataTable( {
// 1st 3 columns will not be sorted
"aoColumnDefs": [{ "bSortable": false, "aTargets": [ 0,1,2 ] }],
//......
"aButtons": [
"print",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}
]
[/code]
When I "Save" any of my tables I would like to exclude the 1st 3 columns. Is it possible to do this? Please point me to the right direction, I looked into the documentations and I don't think there is a straight forward way to do this. Or I am not looking at the right place? :)
Thanks a bunch!
Nikke
[code]
$('#myTable1').dataTable( {
// 1st 3 columns will not be sorted
"aoColumnDefs": [{ "bSortable": false, "aTargets": [ 0,1,2 ] }],
//......
"aButtons": [
"print",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}
]
[/code]
When I "Save" any of my tables I would like to exclude the 1st 3 columns. Is it possible to do this? Please point me to the right direction, I looked into the documentations and I don't think there is a straight forward way to do this. Or I am not looking at the right place? :)
Thanks a bunch!
Nikke
This discussion has been closed.
Replies
Allan
I notice you have 'all', 'visible' or 'hidden' are the available parameters, I think it would be beneficial to have a 'sortable' column along with the existing 3.
Specially for something like what I am after (which re-uses the same datatable scripts) but with varying column lengths. The only part that is common is the 1st 3 columns are un sortable everything else is... :)
Just a suggestion! Thanks a bunch for your!
Nikke
Allan