Table export column order

When I export from a table it changes the column order which makes cutting into an existing sheet quite the challenge.

It would be good if the export column order of the CSV matched the column order of the table. Including calculated columns.

2 Likes

Hi Duncan, thanks for sharing this feedback. I've logged it into our internal tracker and we will circle back if there are any updates. Thank you!

1 Like

Also would like to see this feature, have a use case where I want to export a mixture of fixed columns and columns loaded via a CSV and the ordering always prioritises the CSV columns first and then the fixed columns. Would like it to export exactly the way it appears on the screen.
Thanks!
David

Our team is also desperately need this feature, we have a lot of tables and columns are not very different after download. Please prioritize this feature as this blocks us on daily basis.

1 Like

+1

+1

+1

@Kabirdas please prioritize a fix for this asap, super important for us.

In addition to columns getting re-ordered on download, there is a bug (at least for us) where the column at the far right on the displayed grid - which has data in it - is empty when we download the table.

Be happy to send you a video via DM if you need to see that issue (perhaps others have reported it?)

Hey @bwdsl!

Thanks for the bump (along with other folks here). I've passed along your feedback to our dev team - this is definitely something that's commonly asked for.

The missing data issue has been reported before - you can check its status here. One workaround has been to use {{ self }} as a column mapper before downloading the data.

For folks looking to include custom columns and maintain the order of the data being downloaded you might try the following script in a JS query:

const underlyingDataAsObject = formatDataAsObject(table1.data);
const displayedData = {...underlyingDataAsObject, ...table1.columnMappers}; 
const dataToDownload = _.fromPairs(_.values(table1.columns).map(column => [column, displayedData[column]]));
utils.exportData(dataToDownload, 'ordered_data', 'csv');

If your data is already formatted as an object you don't need to call formatDataAsObject and that might be a good place to start debugging if it doesn't work for you right away.

Let me know if you run into any issues with it though and I'll be happy to take a look!

1 Like

@Kabirdas thank you so much for the quick feedback. We'll take a look at these suggestions and see if we can get it working.

@Kabirdas worked with {{self}} on the missing field, thank you!

Update! This missing data issue should now be fixed :slight_smile: Check out this post for more details: