Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

v1.1.0 datatable hidden_columns/exporting loses hidden headers when export_header='names' #546

@laoxu0212

Description

@laoxu0212

Hi there,

hidden_columns in 1.1.0 has really helped me a lot, however, here comes the question with exporting:

After using hidden_columns to hide some of the columns, I need to export data(no matter what is displayed after hiding several columns or the whole table).

It seems that the data of hidden columns will be exported anyway but the headers of them will not if I set export_headers='names'. It just leaves several data without headers.

I think the "ids" or the "names" should be same for the headers but the content, therefore, could I believe that there might be something wrong?

Here is a demo code to show that problem:

`import dash
import dash_table

app = dash.Dash(name)

app.layout = dash_table.DataTable(
id='table',
columns=[{"name": i, "id": i} for i in ['a', 'b', 'c', 'd']],
data=[{'a':1, 'b':1, 'c':1, 'd':1}, {'a':1, 'b':1, 'c':1, 'd':1},{'a':1, 'b':1, 'c':1, 'd':1},{'a':1, 'b':1, 'c':1, 'd':1}],
hidden_columns=['d'],
export_format='csv',
export_headers='names'
)

if name == 'main':
app.run_server(debug=True)`

And the csv looks like:
image

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions