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_MDAdnan_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

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin

    columns.visible to control if a column is hidden or not in the DataTable. Then for export, use the columns option of the export button to tell it what columns to include. See this example for how to do that.

    Allan

Sign In or Register to comment.