-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Import JSON refresh with Sheet Trigger #49
Comments
it`s done |
How did you do it @RonKon? How is this used? Is there an example? I just put a PR #51 in to make a "recalc" parameter. Which when the referenced cell is changed (manually for my purposes) then the ImportJSON() is re-loaded and the sheet recalcs. example: Changed: |
See #59 (comment) I guess we can close this and only use one issue, seems to be a duplicate. |
I've had same problem, first I tried to clear the cell that contains formula then set the formula again, but it doesn't work. When I add SpreadsheetApp.flush() between these steps, it worked perfectly.
|
@xyzzy529 If the referenced cell is set to an auto updating value like |
@akonyar Thank you so much for this hint. Indeed it works. thanks again |
@akonyar @eemreyesil Is there a way I can change this code to get a sheet to only refresh/update when say cell A1 is TRUE (e.g. checkbox is ticked), so I can prevent API calls via importJSON from being made in that sheet? Similar to a "kill switch". It only updates when the check mark is FALSE |
Somewhere in the spreadsheet write True and in the below cell, False. Then select A1. Under Data tab, click data validations, for select from range box, select the cells you wrote down True and False. In the code, define a variable for A1 cell. Put a condition such as if this variable is True {...} else {}. If you want auto refresh (in case it is True), you may use recursive functions. You can call the same function under the first if statement(if True{return reCalculate()}) and under the else statement, you can type return something else. I hope I may help you. |
Hi,
the script works perfectly and is really helpfull for me.
It is possibile you implement the function sheet trigger to create a automatic refresh.
I have tested so many variants of refresh but all not working with your script.
Thank`s in Advance for help
The text was updated successfully, but these errors were encountered: