How to get a specifically column by its id?
How to get a specifically column by its id?
prox108
Posts: 6Questions: 4Answers: 0
Hi guys!,
Currently I capture columns to export like this:
`
extend: 'excel',
title: 'Report',
exportOptions:
columns: [':visible :not(:first-child,:nth-child(6))']
`
As you see I only export columns currently visible excepting the first one and the sixth column.
Unfortunately this sixth column is dynamic, meaning it can be in another places sometimes, like in tab 1 it is the sixth, but in tab 2 it is the eight.
Do you know How can I get this column by its id in order to add it to my :not:() function?
Answers
You could add an id to the
th
in the header for that column and then use#myId
as the selector. See also Kevin's reply in your other thread on this topic.Allan
This example states that you can use any mix of
column-selector
options. You should be able to add the column ID to the array, like this:Kevin