Search code examples
javascriptgoogle-apps-scriptgoogle-sheetsgoogle-sites

How to embed live Google Sheets data into Google Sites


I need to embed Google Sheet data into a Google site. This is easy to do for static data, but not for live, changing, dynamic data in the Sheet. I need the Google site to automatically refresh in realtime for any change made on the Google Sheet.

I have tried using the automatic refresh/publish checkbox on Google Sheets. This will make the data available to the Google site, but the Google site does not automatically update unless the page is refreshed.

I expect one user to add information to a cell in Google Sheets, and in realtime the embedded sheet data on the Google site would reflect that change. However, what actually happens is the cell is changed in Google Sheets, then the Google site has to be refreshed manually in order to display the changed cell.


Solution

  • There is a way, but automatically updating content every 5 minutes (I ignore if the frequency can be changed).

    You have to go to Gsheet > File > Publish to Web.

    From there you grab the link and publish.

    Then, you go to Google sites > Insert > Embed. Choose URL, paste link grabbed before.

    Hope that helps!