0

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?

1
  • but your script function is clearRange not Clear1 (?) Commented Oct 13, 2017 at 16:19

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.