Hiding the columns in the table but want to export the hidden columns data in export
Hiding the columns in the table but want to export the hidden columns data in export
Adnan_MD
Posts: 1Questions: 1Answers: 0
I'm working on a Laravel project where I'm using DataTables. I want to hide certain columns in the table, but when exporting the data to Excel or other file formats, the hidden columns' data should still be included in the export. How can I achieve this?
Answers
columns.visible
to control if a column is hidden or not in the DataTable. Then for export, use thecolumns
option of the export button to tell it what columns to include. See this example for how to do that.Allan