crypto-sheets
crypto-sheets copied to clipboard
SpreadsheetApp.getUi() cannot be called from this context
When creating a trigger, the onOpen
function runs the createMenu
function which throws the error in the issue title, and the scheduled trigger fails. I worked around that by creating an onTrigger
function:
function onTrigger() {
getData();
getGlobal();
}
and executing that instead of onOpen
strictly within the trigger. Everything else worked well, much better than the scraping that I had in place prior to finding this!