I'll begin with the specific question: Is it possible to stop function-containing cell from autorefreshing on open?
Or perhaps is it possible to apply a function (which itself calls other functions who call other functions before the actual output is produced) from Apps Script onto a cell without having a formula calling the function written onto the cell? I suppose that would update the JSON table only when the function runs from the script, without anything from the sheet being able to trigger it.
MORE INFORMATION: I have a spreadsheet that has two sheets: one pulls data from an API using ImportJSON and the other runs calculations on some of the values from the data.
The ImportJSON function is called automatically from a time-triggered function which writes the =ImportJSON formula into a cell in the first sheet. It also automatically copies the calculations in the other sheet one row below, so the calculated values are archived right before new data is pulled from the API.
The issue is that sometimes (but not always?) the =ImportJSON function, which is written into a cell, gets refreshed when I check the spreadsheet. This updates the data at an unintended interval before the appropriate data was archived.
Thank you in advance.
ImportJSON()
as a custom function in a spreadsheet formula, call it directly from your time-driven function code, and store the 2D array you get as the return value in the spreadsheet usingRange.setValues()
.