I seem to spend my life working with lists of names and things, eventually ending up in Google Apps Scripts and AI2 apps. As I work mainly inside a google domain, accessing all the data there can be a bit of a pickly when working outside of the browser.
I didn't realise you could do this, but whilst playing around with google sheet url parameters, I found I could wget a google sheet and download it as a csv. (
wget is the command line program for downloading items on Linux).
So wondered if I could do the same with AppInventor. Yes I can!
If you are security conscious about your data then this might not be a solution for you, as you will need to set the sharing option for the google sheet to "Anyone with the link". You can find arguments for the pros and cons of this in many places on the interweb.
Setup
- Create your google sheet
- Ensure you only have one sheet (Google will only download the first sheet as csv)
- Add your list data, one row after the other (makes a data table of one column)
- Get the ID of your spreadsheet
(If your list data is in a multiple tab spreadsheet, it is easy enough to create another spreadsheet and =importrange() then data you want)
Then probably easiest to download the aia attached to see how this works, but see below the blocks and a screen grab
The important stuff is going on in the Button1.Click event in web1.Url, i simply added a read file and label to display the contents of the file, as proof.
Not experimented, but guessing this can be done with all manner of google apps documents and non native files too.
The real sticking point is the "Anyone with the link" part, but I understand from the interweb a brute force attack on discovering the fileID would take @ 3 times longer than the age of the Earth! fact is if you share data with anyone, it is no longer secure. However I wouldn't use this method for personal information without expressed permission.
Tim