I can't get the Google Sheets import utility to work

Posted by Jeff at 01:10 on Thursday 19th August 2021 [link]
Hi, I am trying to follow your example to connect with data from google sheets, however your link https://www.rgraph.net/demos/line-sheets.html don't show a graph as all others. Is this example working properly?
Replacing your google ID with mine neither works.
Thank you!

Posted by Richard at 11:28 on Thursday 19th August 2021 [link]
Boy is it your lucky day - sort of!

Two days ago I found out that Google has recently (days? Certainly since my last release of RGraph) changed their API for Google Sheets. So I've been updating the workings of the RGraph Google Sheets import tool.

So far the canvas and SVG libraries have been updated - the PHP one I'm hoping to do later on today.

Regardless though I've added the new version of the library here:


And there's an example of it showing a regular and grouped Bar chart here:


One thing that's new compared to the old method is that Google now requires you to get an OAuth key.

This is quite a simple process though - there's a link to where you can get one in the updated "Setting up" docs, which I've added here:


Any problems just come back to me here.

FYI The links have been removed but the updated sheets library is now part of the regular RGraph download.

Posted by Brett at 16:34 on Thursday 19th August 2021 [link]
@Richard - you are the man! I was able to update the common sheets file, create my API, and update my calls to include the 4th parameter and the name of the google sheet. For others, I also needed to change the permission of my sheets to "Anyone with the link".

Posted by Richard at 17:21 on Thursday 19th August 2021 [link]
Great. Did you have any trouble creating your API key?

Was the "Setting up..." documentation clear enough?

[Replies are now closed]