Export DataTable to Excel along with other data

I’m generating a DataTable by importing data from a SQLite database and enabling it to be exported to Excel. However, I don’t load all the columns from the DB into the table because the ‘Abstract’ column has over 100 characters but I would like it to be exported along with the shown columns.

I thought of loading the ‘abstract’ column into the table but not displaying it (although couldn’t do it) or working a way around it by making an Export button myself.

Is there an easy way to do any of those or a more viable option? Thanks!

Solved it!

I assigned a style_cell_conditional like shown below:

style_cell_conditional=[{'if': {'column_id': 'Abstract'}, 'display': 'none'}]

and it worked, the ‘Abstract’ column isn’t shown in the table but is downloaded when you export it. :slight_smile:

1 Like