9

How frequently does the importrange function refresh and reload the source data?

Rubén
  • 34,714
  • 9
  • 70
  • 166
Argyll
  • 8,591
  • 4
  • 25
  • 46

1 Answers1

6

When closed

Never.Spreadsheets update external api only onOpen(). But there is no documentation and this may change in the future.

When open, 30 minutes

Functions that pull data from outside the spreadsheet recalculate at the following times:
ImportRange: 30 minutes
ImportHtml, ImportFeed, ImportData, ImportXml: 1 hour
GoogleFinance: may be delayed up to 20 minutes

Opening the spreadsheet refreshes all the functions.

Community
  • 1
  • 1
TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • How is start time determined? – Argyll Mar 14 '18 at 14:54
  • So an onOpen() event will reset the timer? – Argyll Mar 14 '18 at 15:01
  • The part where you said "I don't think these functions operate when the spreadsheet is closed" is very relevant and important. The frequency is different when open from when closed? – Argyll Mar 14 '18 at 15:36
  • Got it. Thank you for the info. – Argyll Mar 14 '18 at 15:55
  • 1
    It's more for future knowledge. For now, I share a copy of a sheet which reads data from a website but only occasionally. I turn on and off the trigger manually on my own sheet for myself. It's a bit inconvenient for me to have to go into the copied sheet to change the triggers there too. I want to use `importantrange` to sync my sheet with the copied one. I don't have any more scripts that would edit the sheets while closed at the moment. But it's good to know exactly how `importantrange` works. – Argyll Mar 14 '18 at 15:58