Insert an Image into a Google Sheet and assign a function to the image using Apps Script code

360 views
Skip to first unread message

Alan Wells

unread,
Mar 1, 2020, 4:15:47 PM3/1/20
to Google Apps Script Community
Imagine that you want to insert an image into a Google Sheet with code.  It may be because you want to build a user interface in the spreadsheet of your user.  Maybe you would like to avoid having the user copy a Sheets template file, so you are building the Sheet content with code.

Maybe you don't want to use a sidebar or dialog box, but instead, use the spreadsheet itself as the user interface.  You could create a custom menu and/or add-on menu, but maybe you'd rather have an image of a button for the convenience of the user.  For example, a button to run some code that is directly under the last row of user settings.

It's possible to do with Apps Script!  I don't know when this capability became available in Apps Script, but this is something that was previously either not possible or maybe thought to be impossible.

See the Stack Overflow question regarding this issue at the link below.  This question at Stack Overflow had remained unanswered for almost 3 years.  But now it's answered!


Dimu Designs

unread,
Mar 1, 2020, 6:57:55 PM3/1/20
to google-apps-sc...@googlegroups.com
That feature was released October 30, 2018. See release notes. I think we discussed it at some point here in the group.
Reply all
Reply to author
Forward
0 new messages