🟩 Use gviz to get and query google sheet data

Guide on how to use the google visualization API to get and query "public" google sheet data

Note: this approach has been knocking around for years, e.g. App Inventor Tutorials and Examples: Google Spreadsheet Database | Pura Vida Apps, but I have never seen it "properly" explained like this...

5 Likes
Google sheet data read
Get range from Google sheet to populate spinner elements
Execute app script to filter dynamic data in google sheet
Phone Calling from sheet data
Spread Sheet - error csv
Wrong Google Sheets data visualisation
How do you make app to show specific data from spreadsheet
Scanning the code and getting information from the Google sheets
Hi guys, how can i make the data (x) be showed by selecting the user of the City (x) and the data (y) be showed after selecting the city (y)
Webviewer component giving results as undefined
Need help on my sms app
I wish to download all emails and put it within a .txt file. Then I want to send selected emails to selected people using any keywords in the email
School class schedule and multidimensional arrays
Google sheet auto sort script code needed!
Google sheet auto sort script code needed!
List View Shortage old to latest
CloudDB or Google Spreadsheet?
Error al exportar
Trouble creating login with multiple values
How do you join 2 texts and separate with a new line?
Air ticket booking app - importing data from Google sheet
My Apps sometimes error and lagging. What should I do to counter the problems?
Phone Calling from sheet data
How do I pass a value from appinventor to google sheet?
FAQ Section: Google Sheets
Is it possible to access AI2 data from a website?
Question about posting project files (.aia) containing "secure" information
Is it possible to limit the number of boxes in a list view?
Is it possible to read partial data of a txt file?

Always like your tutorials :+1:

2 Likes

A very nice solution. From now on, we won't need to download the entire csv table :grin:

1 Like

thank you for providing a more detailed guide...
I now added a link to your guide on my page here App Inventor Tutorials and Examples: Google Spreadsheet Database | Pura Vida Apps

Taifun

2 Likes

(added to FAQ)

I especially like the HTML output option, providing a free table display without having to use JavaScript.

2 Likes

Why use this? Google should provide better security for private files.

{The security is fine if you write the script with the ID hard coded.

If you do not, and the user has access to and  CAN send other ID's of google sheets YOU OWN and have PRIVATE, then....

There are a lot of big IFs in this, but better to be safe than sorry. This example is also to show that it can be done using gviz, just that there are some caveats attached.

Another method is offered....}

[EDIT - the above actually relates to the other tutorial on gviz with private google sheets]

gviz is just another of several methods used to access public google sheets. There are no security issues here.

2 Likes

I saw on your website that there is a Google macro about this. So, how can I protect my files from being stolen? It is like Google is leaving a "peep hole" for others to see.

1 Like

You probably need to read up about google apps script:

Correct application of scripts and app blocks is needed.

2 Likes

Thanks @TIMAI2, This is a cool tutorial. I liked the html option, too. As always, it is clear and to the point.

Google provides data sheets, and how and what the user will use it is up to the user. Although they could make something like an access token.

1 Like

An access token is secure. Unless the access token link gets stolen.

If you don't link to your file anywhere and share it with everyone who has the link, nothing will be stolen.
Here, people learn to program and use the api provided by google. So maybe it's bad that the goggles provide such api? Everything is good for smart people ...

I have able to get like this image.But there is one problem it will show all data in Label-1 only. I want to separate it into 3 labels like.
Label-1 will show only Id,
Label-2 will show first_name
Label-3 will show last_name.

can anyone please help me to extract these into multiple labels.
Thanks

Why do you have 4 accounts? You can only use one.

i have only one Naveen_Kumar2

and the photo is also not belongs to me. all other accounts are not own by me.

Ok, sorry my bad. I apologize for the inconvenience.

no problem

Here is one way ...