I'm trying to use ImportHTML in Google Spreadsheets to update data regularly. The standard ImportHTML-code updates once an hour which is too slow, so I found some Google Script to do it every minute. (I should mention I'm not a developer so I'm kinda operating blind)
However, the script doesn't replace the old data with the new data (which is the idea). I need to remove all data from the spreadsheet for it to update the information. It seems to me te script is executing, but simply doesn't overwrite when cells are already filled. This is the Script I'm using:
function myFunction() {
var sh = SpreadsheetApp.getActiveSheet();
var r = "A1";
var insertDataOption = 'overwrite';
var f = '=ImportHTML("URL";"table";1)';
sh.getRange(r).setFormula(f) .onChange;
}
I hope you can help, thankS