Pull data from Google Sheet into Google Web app

197 views
Skip to first unread message

C. N. Desrosiers

unread,
Oct 6, 2016, 4:11:55 PM10/6/16
to Google Visualization API
Hi all,

I'm just starting out on my journey to building web apps.  I have a Google Sheet populated with development timelines for different teams working on a big project.  I'm trying to build a web app to visualize progress on the various work streams.

I followed the web app tutorial, in which the data source / table was input directly in the .gs script.

However, I can't find a solution for importing a sheet via its URL into a .gs file.

What's wrong with this?

function doGet() {
  
}


Thanks in advance.  And apologies for the simplicity of the question.  I am not a programmer!

Cheers,
C
Message has been deleted

Benjamin Hill

unread,
Oct 7, 2016, 2:13:57 PM10/7/16
to Google Visualization API
It is easier to load data from a fully public spreadsheet, where you can grab the data in CSV format.  See SO accepted answer.

If you need to load data from a spreadsheet with more normal access restrictions, then start with https://developers.google.com/sheets/quickstart/js  The oAuth code can be intimidating at first, but most of it is copy-paste, and you end up with a nicely structured javascript object containing the spreadsheet's data, while still respecting read/write permissions.  Most of the code is to handle the permissions pop-up and isn't specific to which oAuth permission you are asking the user for.

If you are looking at timelines, I also highly recommend https://developers.google.com/chart/interactive/docs/gallery/ganttchart
Reply all
Reply to author
Forward
0 new messages