I'd like to use a trigger in my Google Sheet, similar to onOpen()
, but instead to trigger when I close the sheet. However, I haven't found anything like that built-in in the Google API guides, nor anything others have posted, and am not sure how to write one. Any help?
At this time there is no onClose trigger. To learn about the available triggers see https://developers.google.com/apps-script/guides/triggers/.
At this time Google Apps Script users can't create custom triggers, so a feature request should posted on Google Apps Script Issues. In this case someone else already did it. You could star it to let the Google Apps Script team that you are interested on it:
Issue 2334: OnClose() or OnExit() would be amazing!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With