export option for hidden column
export option for hidden column
Hi,
What I'm trying to do is to export hidden column which have the class. hidden_max
and I don't want to export column that have .hidden class (some column may be hidden or not those have .hidden class)
My case is I have a column that display only 30 characters on the table, when exporting I want to export all.
I'm using responsive, colvis & colreorder.
<!-- only display in table no export -->
<td title="<?=$TaskValue["task"];?>">
<?php echo mb_strimwidth($TaskValue["task"], 0, 40, "...");?>
</td>
<!-- hidden in table, but export the data -->
<td class="hidden_max"><?=$TaskValue["task"];?></td>
exportOptions: {
columns: [':visible:not(.not-export-col):not(.hidden)'],
}
.hidden_max {
display: none!important;
}
Also is there a way to call column and don't export if+ not a class
columns: ['5,7, :visible :not(.not-export-col):not(.hidden)'],
So if col 5 and/or 7 is visible and don't have the hidden or not-export class
export the data
else do not export the data
Thanks
Answers
I'm opened to any other kind of solution that allow to show only x character on table and allow to export the complete data.