TableTools export choose columns to export AND visible
TableTools export choose columns to export AND visible
titi71191
Posts: 6Questions: 0Answers: 0
Hi everyone,
I am using TableTools and I have already discovered many usefuls features.
I have a an HTML table which use TableTools. The first column is used for a link which clicked loads a new pages for details about
the record so I don't want this column to be exported.
I already read the documentation about mColumns and the array argument, eg : [1, 2, 3, 4...]. But the matter is that i can also hide columns (dynamically) and I don't want the hidden columns to be exported.
So how can I combine the argument "visible" and the array for mColumns? Is it possible or is there another method?
Thank You,
PS: Sorry for mistakes if there are any...
I am using TableTools and I have already discovered many usefuls features.
I have a an HTML table which use TableTools. The first column is used for a link which clicked loads a new pages for details about
the record so I don't want this column to be exported.
I already read the documentation about mColumns and the array argument, eg : [1, 2, 3, 4...]. But the matter is that i can also hide columns (dynamically) and I don't want the hidden columns to be exported.
So how can I combine the argument "visible" and the array for mColumns? Is it possible or is there another method?
Thank You,
PS: Sorry for mistakes if there are any...
This discussion has been closed.
Replies
mColumns: "visible"
[/code]
:-).
Allan
I have 8 colunms, some are visibles and some are hiddens. My first column is always visible.
I want to export all the visibles columns except the first column.
Anyway thank you for your quick response, :)
Allan
Thank you Allan :).
Where is located the source code for the xls export?
Thank you,
Allan
Regards,
I went to TableTools.js and in the method _fnGetDataTablesData i just modified the first value of the index, for the headers and columns loop, from 0 to 1.
Regards,
Replaced condition if(aColumnsInc[i]) with if (dt.aoColumns[i].bVisible) in Header and Body parts.
This might be usefull for others who like to export only visible columns.
@kashinathn thnx your fix help saved me a lot of trouble and works perfectly