HTML5 Export Excel (Always exclude column 0)
HTML5 Export Excel (Always exclude column 0)
I've been studying this http://www.edihor.datatables.net/extensions/buttons/examples/html5/columns.html
I understand that you can specifically call out the columns you want to export with
exportOptions: {
columns: [0, 3, 4, 6]
}
However, I have a page that will produce a dynamic table. There could be anywhere from 8 to 19 columns depending on the variable posted to the page.
I want to ALWAYS exclude column 0, but I can't just do:
exportOptions: {
columns: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]
}
because DataTables throws an error if there are only 12 columns in the table and it can't find column 13 through 19
Is there a way to just say "Show every column EXCEPT for column 0"
This question has an accepted answers - jump to answer
Answers
https://datatables.net//forums/discussion/36832