Skip to content

Instantly share code, notes, and snippets.

@willinspire
willinspire / Google Script Cache-Busting IMPORTHTML.md
Last active June 15, 2023 16:16 — forked from ranaroussi/Google docs cache-busting importdata.md
It is not easy to refresh the IMPORTHTML functions in Google Sheets due to cashe limitations. The resulting limitations are old data instead of new data being pulled into the Sheet upon running a Script to reload the IMPORTHTML function. This Google Script is a "Cache-Busting" function which circumvents this problem.
// Set your variables below
SHEET_NAME="MC-Import-Data"
URL="https://coinmarketcap.com/currencies/views/all/"

// Create a trigger to refresh every 5 minutes
function myFunctionA() {
  ScriptApp.newTrigger("getData")
  .timeBased()
 .everyMinutes(5)

Keybase proof

I hereby claim:

  • I am willinspire on github.
  • I am 1010 (https://keybase.io/1010) on keybase.
  • I have a public key ASD88fgaRJM1MGE9b1B-SNvofER29oeHlUjjchuSlHMcWwo

To claim this, I am signing this object: