Copy dataset to clipboard?

We use Google Sheets heavily, and getting data from Retool tables into the sheets can be onerous (you have to export to csv, and either (1) open Excel and copy/paste the data (2) import the whole file into Sheets using the import dialog).
Is there a way to simply copy a table to the clipboard so it can be pasted into Sheets? This would prevent having to export. This is one of my favorite features of Mode and would love to see it in Retool if possible. (- Answer any Question with SQL | Mode)

Screen Shot 2019-07-08 at 10.29.26.png

1 Like

hi @austin-king!! great to hear from you again :slight_smile:

this sounds like a great feature! i’ll look into it sometime today and get back to you with an update

I’m assuming you want something like this:

1 Like

so you can do this, with the Button component’s “copy to clipboard” feature. Here i was using this snippet:
{{ Papa.unparse(, { delimiter: '\t' }) }}

if your table is populated from a sql query, you might have to instead use this:
{{ Papa.unparse(formatDataAsArray(, { delimiter: '\t' }) }}

note that there’s currently a bug in production that stops this from working properly, but I’m pushing a fix for it tonight. if you try this tomorrow it should work just fine

Oh awesome! Very cool to see that this is currently possible. Thanks for the quick response!

This is cool. thanks. Is there a way to do this so it only copies the data values from a query and not the field names?
Yummly CCPA Tracker - Google Sheets 2020-08-07 12-10-49

Hey @yummly-mcg!

I was able to get this result with:

{{ Papa.unparse((formatDataAsArray(>Object.values(d))), { delimiter: '\t' }) }}


{{ Papa.unparse((>Object.values(d))), { delimiter: '\t' }) }}
1 Like

Great-that does it - thanks!

1 Like

Screenshot 2023-07-04 151726
i am geeting issue to copy data from retool and paste into csv or excel

1 Like

Hi @Dhrumil_Modi Thanks for reaching out! I saw a support ticket with your colleague where this was solved with the following code

{{ Papa.unparse((>Object.values(d))), { delimiter: '\t' }) }}
1 Like