0
votes

I have a spreadsheet where I am accepting google form responses and in the same spreadsheet I have a dashboard which give out link to open new form. users are suppose to enter data every 10 minutes and I have a minute counter that show when last time data was submitted, how many minutes since last data submit and what was summary of last submit. Along side this information they will have a link to open new form.

Users are using tablet to record data and they are opening spreadsheet on html view as on tablet browser by default it opens like that as well as its easier to open hyperlink through html view.

I have sheet on recalculate every 1 minute to make sure minute counter updates at least every minute.

But html view does not update it self unless user manually reloads the page hence they cant see updated summary of last submit as well as can not see the timer.

Is there a way to force reload or refresh or recalculate sheet on html view to have this work?

Thank you very much for help in advance.

2

2 Answers

0
votes

No, there's no way to refresh the users browser page/session and reload the page, as Apps script can't access the browser.

0
votes

You can combine window.setTimeout() and window.onload to make a website run a function at intervals.

Mozilla Documentation - setTimeout

Documentation - window.onload

<script>
  function reloadMyPage(delayMilliseconds) {
    setTimeout("location.reload(true);",delayMilliseconds);
  }
</script>

<body onload="JavaScript:reloadMyPage(5000);">

Here is documentation about embedding a Google sheet into a website:

Google Support Documentation - Share a Speadsheet

You need to publish the spreadsheet to the web. Make sure to choose the EMBED Tab:

Publish to Web

Copy out the iframe code and put it into your website.