Export table "as displayed"

Is there any way to export a table's data as it is displayed in the table? Same columns included, in the same order, ideally with the same column names and mappings if possible.

Thank you!

Hey @byron!

Great question, short answer here is not natively at the moment. You can use a JS transformer rather than the built-in column mappers to customize your table data before you pass it to your table component and export the data from there. Do you think this something like this could work for your use case here?

1 Like

Thanks Chris for the reply. I feel like the default behavior of the download button should be "download what i see in the table". Perhaps you can discuss it with the rest of the product team?

To answer your question, it's far from ideal to have to transform my own data. Putting it in the right order, selecting which columns to show, and applying the mappings all a second time would be...pretty painful.

If you don't want to break any existing functionality, a separate table property for "displayData" would be just as good.

Thanks a lot!

Hey @byron — I definitely agree, this makes a lot of sense and would be a great feature. We currently have a team working on reworking existing components and will make sure to pass this along in an internal feature request to the team working on a table rework so hopefully we will be able to do this natively in the future!

Hi @Chris-Thompson and @byron, isn't there a property called displayedData in table components?

I've been using it since last week. The only thing I know not included in this property is the custom column hence I have this transformer in my export event:
displayed_data_export

Is this what you are looking for @byron ?

For me that property does not match the show/hide settings nor the ordering of what I see in my table. Thanks for the suggestion though,

Didn't work for me either @jocen - just exported all the columns, not just the visible ones...

If the table's "Download raw data" toggle is enabled, the CSV export will be exactly equal to the table's data property converted to CSV format.

If "Download raw data" is disabled, the table data will download with:

  • Mappers applied
  • Current filters applied
  • Modified column titles (i.e. customer_name edited to -> Customer Name)

It will not match:

  • Columns order horizontally (it will match the order as input to the table originally)
  • Rows in sorted orders (it will match the order as input to the table originally)
  • Pending recordUpdates values

Download raw data OFF is now the default setting for new table components that are created.

As for the table's displayedData property: that actually only accounts for filters, not mappers, hidden/shown columns, or any other updates to how the raw data is displayed. I believe this property name pre-dates the existence of column mappers, and that kind of thing is very difficult to safely migrate the behavior of inside existing apps.

1 Like

Following up on this - it would be great if the export of displayedData actually exports the as is displayed data without having to do mappings (which are already done). Any chance this could be looked into again? There is no way to currently export to xlsx of a table that has had any mappings and/or hide columns. Would greatly help our workflow. Ty.

ps - I'm aware of the download arrow in the bottom right which sends it to csv, but you don't get any control over the naming of the file nor can you export to excel format.