[RGRAPH SUPPORT] I can't get the Google sheets import utility to work

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

Post a reply
Posted by Jeff at 01:10 on 19th August 2021
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 19th August 2021
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.

Posted by Brett at 16:34 on 19th August 2021
@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 19th August 2021
Great. Did you have any trouble creating your API key?

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

Post a reply

What's your name?
What do you want to say?