How to share or embed a Google Sheets chart that updates instantly (no need to wait for 5 minutes)
You probably know that you can share or embed a chart in Google Sheets by “Publishing” it, after which it will update automatically when the data range is changed.
This works well in most cases, but the problem is that the chart will only be updated once every 5 minutes. What if you want your shared or embedded charts to update instantly when you make data changes?
Below I explain how to do this. The solution is super straight forward and does not have anything to do with publishing a chart. It is important to keep in mind that, with this solution, if you want to share your chart publicly, your sheet that contain the chart will also be public.
Step 1 — Copy & change the link in the browser url bar
Go to the sheet/tab with the chart you want to share or embed and copy the the link in the browser url bar.
Here’s an example link I copied: https://docs.google.com/spreadsheets/d/1Wie9f9yggxyRUIcjT04lB8dp9fhaujn6YrLJsNVGY_o/edit#gid=1913597072
This link will share the whole sheet but obviously you don’t want to do that; you want to share a specific chart.
So let’s do that by pasting your link into a text editor where you can change it.
- Replace the “edit#” part in the url with: htmlembed/sheet?
- Next, get the cell number where your chart is and add it in the following format to the end of the url: &range=F2
If you don’t know what the cell number for your chart is, just cut and paste the chart in any cell. That will be the cell you’ll use. My chart is at F2 as you can see.
Your url should now look something like this and will be a dynamic chart that updates instantly when you make changes: https://docs.google.com/spreadsheets/d/1Wie9f9yggxyRUIcjT04lB8dp9fhaujn6YrLJsNVGY_o/htmlembed/sheet?gid=1913597072&range=F2
If you want your chart to be publicly visible, you’ll have to change the sharing preferences.
Step 2 — Change your sharing preferences
To change the sharing preferences, click on the Share button in the top right corner of Google Sheets.
In the pop-up modal, click on the “Advanced” link, then “Change” to set who will have access to your chart, and then “On — Public on the web” option to make it public.
Step 3 — Share or embed the url
You now have a url you can share or embed in an iframe that will instantly update when you change your data ranges.
Go on and try it yourself.
- Paste your url in a new browser bar
- Change your data range.
- Refresh the chart url and see how it updates instantly.
Here’s how to share or embed a Google Sheets chart publicly and make it update instantly when you change data ranges:
- Copy the url from the browser bar and change the url as above
- Set your sharing preferences
- Share or embed the url