I’m building a Google Sheets add-on and want to create a button within the sheet that triggers a script when clicked. I understand that one way to do this is by drawing a shape and linking it to the script manually, but I want to explore if this can be done programmatically. I have three specific questions:
I would appreciate guidance or examples to help me understand the best approach for creating interactive buttons in Google Sheets with Apps Script, especially in the context of an add-on.
Yes. But not with drawing. You can use any external images as buttons. Use sheet.insertImage()
and assignScript
on the returned overGridImage.
Yes.
No such method. But you can use alerts