Google Sheets natively controls how the functions recalculate according to different behaviours (modifying cells, opening the spreadsheet, …)
To avoid that IMPORTFROMWEB fetches the data source constantly, imported data are cached 24 hours by default. Therefore, whenever IMPORTFROMWEB recalculates, the content is retrieved from the cache.
This said, there are 3 options to control when your data updates, let’s check them out.
It is possible to fetch the latest data as many time as you want, whenever you decide. It will refresh the website where the data is located and retrieve it in a few seconds, thus replacing the previous data. As ImportFromWeb goes to the webpage to fetch it again, any new update will be consequenty counted as a new request/credit.
Note that the RUN button works either for 1 single function or for all the functions within your active sheet or even all the functions of your spreadsheet. Just select the appropriate option on the drop-down menu.
=IMPORTFROMWEB( ) function can be executed automatically even though the spreadsheet is closed or even though you’re offline. Again, setting up an automatic trigger can be done through the sidebar. check out our step by step video.
The scope of automatic triggers is the related spreadsheet it is set on and it applies for all the functions in that spreadsheet. Triggers are defined on a hourly, daily or weekly basis.
You always keep an eye on all your defined triggers. Access to your Account section in the side bar and view all the triggers metadata (creation data, last execution date, times executed…)
The cacheLifespan option enables to overwrite the default cache setting (24 hours). You can define the time in hours, days or weeks during which you want to keep your data before it is fetched again. It helps you to control your credits usage when you do not need to update your data that frequently.
Check out how to use the cacheLifespan option within your =IMPORTFROMWEB( ) function.
You can always check the last time the data was fetched through the Monitor tab in the sidebar:
You can also use the following formula: