I need help. I'm trying to make a backup of my worksheet that makes it take the data from the worksheet and put it in another worksheet but it's giving this error!
CodePudding user response:
SpreadsheetApp.getUi()
can't be used in stand alone projects ejectuted from the script editor, it only works when the stand alone project is used as a Google Editor Add-On.
I know that your script is an stand alone project because the screenshot shows the share button.
In order to be able to use SpreadsheetApp.getUi()
you should,
- test it as Editor Add-on
- use it as Editor Add-on
- use it from a script contained in a spreadsheet
Related
- "SpreadsheetApp.getUi() cannot be called from this context"
- Google Script Cannot call FormApp.getUi() from this context
- Exception: Cannot call SpreadsheetApp.getUi() from this context. (line 2, file "Code")
CodePudding user response:
I can solve the problem of SpreadsheetApp.getUi() but now I have the following problem Exception: Range not found