Refresh Button / Auto Update GOOGLE SPREADSHEET
So I was searching for a good way to do this as well. Here is what I have found so far.
If you change the function line of the importJSON
like this:
function ImportJSON(url, query, parseOptions, recalc) {}
Which just adds the recalc
parameter to the function definition. This is a 'trick' because that parameter is not used for anything other than to make GSheet
think something has changed.Then in the call to ImportJSON
(in a GSheet
cell), you add in the function call like this:
=ImportJSON("https://yourDomain.com/something","","rawHeaders",A1)
Then in the sheet you can manually change the value of A1
to anything different than it is. The Sheet and all the imports will get refreshed.
Another ... non-technical trick ... manually change A1
to 1 then 2 then 3. Each time the sheet will recalc. Now you can use the UNDO and REDO buttons to change the numbers and recalc the sheet.
A little of a kludge Hack, but it does make for a one-button "recalc" of a sort.
File > Spreadsheet settings > Calculation > Recalculation: On change and every minute
Then you can insert a =now() column and it will refresh the sheet every minute.
Apologies if you've tried this already, I have it setup now in a sheet but am waiting for a live event to test, so it might not even work.