New Action - App: Export this view to a Google Sheet (not a row level action)

Given that AppSheet now has App Script workflows, I'm hoping there will be a new Behavior for exporting current view, but instead of to CSV, to Google Sheet.

For organizations that are generally using Google Environment (and requesting MS Excel needs justifications), Exporting to CSV will pose limitations to users who want to work on the subset of files on a separate Google Sheet (since no Excel).

There is probably a way to do this via App Script call, but I'm not sure how to pass the current view only to the App Script as the parameter.

Status Open
5 5 965
5 Comments
dbaum
Gold 4
Gold 4

Maybe there's a more straightforward approach, but here's one idea that occurs to me to try.

Send the list of keys to Apps Script, and then within the script invoke the AppSheet API's Find action to return the entire rows for those keys. By using a slice for the Find action, you could limit the columns returned by the AppSheet API. Once you've got the rows and columns you want in App Script, you could populate a Google Sheets spreadsheet.

JPAlpano
Silver 4
Silver 4

Thanks dbaum.  I agree with your suggestion.

Would be ok for me yo try since I have knowledge in Apps Script.  

But for those who don't, this new action can prove beneficial.

🙂

scott_robinson
Silver 2
Silver 2

There is a workaround which I have created for one of my school apps.

I use Appsheet to generate a .xlsx Worksheet at the press of a button.  This worksheet has around 6 separate tabs in it.  Each tab has a <<Start:>> expression that populates the rows of each of those tabs with the data I require.

I get Appsheet to save the .xlsx file with a random UniqueID() as the filename in a specific place on Google Drive.

I call an App Script Task from Appsheet and pass the task this generated filename.

App Script takes over and creates a file conversion that copies the xlsx file as a Google Sheets file.

Now it's a Google Sheets file, I do many things.

1. I Make a copy of a preset Sheets template that has Charts and Graphs drawn to specific (empty) data ranges on various tabs.

2. I then populate that copy with the data ranges from the converted sheet.  Consequently, all of the graphs and charts draw themselves as the data flows in.  I now have a sheet with a list of data and charts that I need.

3. I then make a copy of a distinct Google Doc template that has placeholders where I can Insert the charts and tables from the sheet.

4. I perform the placeholder replacement to get a brand new Google Doc.

5.  I can move this file as normal, or pass the URL of the doc back to Appsheet to store in one of the database fields.  It is now clickable...(pending the correct sharing settings which are also set in the script).

It's very specific of course to my need, but as a proof of concept I can say it works very well!

Most of the time is spent at the Appsheet end where it is generating the initial .xlsx document...it takes around 40 seconds to do this.

Hope that gives you the impetus to have a go with your own solution.  If you need any code snippets from Appscript to do various things, just give me a shout and I will post them.

JPAlpano
Silver 4
Silver 4

This just proves my point more -  that if it's possible to do this using workarounds and tedious scripting, AppSheet team can easily provide a more straight-forward Action button that does this for us..

 

Remember that it will be the app users who will use this so the action should automatically create that sheet in the MyDrive of the users currently logged in.

 

If you are familiar with DataStudio, this is what export as CSV (GoogleSheet) on datastudio tables does.

 

Hope to get upvotes to have tnis feature considered.  

victorfarinella
Bronze 4
Bronze 4

Any news about this topic?

It sounds almost unbelievable that a google no-code platform doesn't have an easy way to export reports as a google spreadsheet file.