Hey Gliders,
I’ve implemented a quick & easy way to export data. This will help to export any kinda glide computed columns to CSV.
Let’s have a look on this,
Step 1
Create Template Column.
Call all the parameters you want in the CSV.
Add comma (,) at the end of each parameter.
Step 2
Go to another table instead of that.
Create a column Joined List
Call that template column into Joined List.
& In the separator just press an enter key. (Just one enter)
Step 3
Create Google Apps Script.
Create a folder in Google Drive.
Copy folder ID.
Copy Paste this script:
function doPost(e) {
// Calling Parameters from GlideApp
const body = JSON.parse(e.postData.contents);
const Data = body[“params”][“Data”][“value”];
const Name = body[“params”][“Name”][“value”];
const CSVName = Name + “.csv”;
const folderid = “FOLDER ID”;
const folder = DriveApp.getFolderById(folderid);
const file = folder.createFile(CSVName+".csv",Data).getId();
}
Click Deploy → New Deployment → Web App → Edit Access as anyone → Deploy
Copy Web App URL.
Step 4
Create Webhook Action from button.
Configure new webhook.
Paste the Web App URL and give it a name.
Add value:
Data → Joined list column
Name → Type file name
Fire the button.
CSV will be created on the folder.
Let me know if suggestions/ errors.
Kindly add headers value with comma to add headers into csv file.
For those who have a cell with “ can attach “” to each calling parameter in template columns to avoid errors.
Pro tip:
I’ve used to filter rows through creating a join list from relation column.
Will this work for any of the users of your app no matter how many users? If so, how can I they access their csv files… Would it be possible for the user to have a download prompt?
It uses the same technique.
And yes, as the app developer you control which users it is made available to.
If you have Row Owners, then users would only be able to export data from those rows that they “own”.