SHEET_NAME="Sheet1"
URL="https://data.sparkfun.com/output/VFEEYZENwLCNwE8LZjDA.csv"
function myFunction() {
ScriptApp.newTrigger("getData")
.timeBased()
.everyMinutes(1)
.create();
}
function getData() {
SpreadsheetApp
.getActiveSpreadsheet()
.getSheetByName(SHEET_NAME)
.getRange("a1")
.setValue("=IMPORTDATA(\"" + URL + "?" + Utilities.formatDate(new Date(), "GMT", "yyyyMMddHHmmss") + "\")");
}
Forked from jaygooby/Google docs cache-busting importdata.md
Last active
June 16, 2017 16:07
-
-
Save ranaroussi/d7b2083674ddfc60e055fd10ba84f08b to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment