0
votes

I am using the script of https://github.com/bradjasper/ImportJSON to import JSON data (in my case crypto currency prices) into google sheets. However I notice that the ImportJSON function I use does not always get called when I reload the sheet so I don't know if I have the last data or not. Approx. half of the time I get the new data and the other half it keeps the old data. The trick I use to have it load the new data is edit the script and rename the ImportJSON to something else such that the spreadsheet fails and then undo the change and then ImportJSON gets called. However this is quite tedious.

Is there a way such that with every reload google sheets reevaluates all formulas and loads the new JSON data

Thanks

Jaap

1

1 Answers

0
votes

Is there a way such that with every reload google sheets reevaluates all formulas and loads the new JSON data?

There is a Simple Trigger called onOpen which executes every time a sheet is opened or when the page is reloaded.

function onOpen() {
   //Write your codeblocks here. For this sample, I'm just using an alert..
   SpreadsheetApp.getUi().alert('Function Triggered on Reload!');
}