Reputation: 3
I have created a script in 'script editor' called
Clear1
to clear a selected range of cells in a sheet. When the script is run from the 'script editor' it executes and clears the chosen cells.
I have created a google drawing and allowed permissions for the script to affect the sheet, but when I click the drawing I get>
Script function Clear1 could not be found
I cannot link a google drawing to the script.
Script is
function clearRange()
{
var Detailed = SpreadsheetApp.getActive().getSheetByName('Detailed');
Detailed.getRange('G40:G53').clearContent()
}
Any thoughts? What am I missing?
Upvotes: 0
Views: 206
Reputation: 38435
Looks that you are using the file name (Clear1) rather than the function name, in other words, instead of Clear1 use clearRange to call the script when you click the drawing.
Reference
Upvotes: 1