function onOpen() { SpreadsheetApp.getUi().createAddonMenu().addItem("Show side bar", "functionToShowSideBar").addToUi(); } You use DocumentApp.getUi() if using google docs. Use SpreadsheetApp.getUi() if using google sheets.
Select a cell in google sheet. Insert->Drawing. Insert a textbox. Add text to it and give it an outline. Save and close. Go to Tools->Script Editor. Create a new function, for instance: function hello() { } Click on the 3 dots at the top right hand corner of the textbox you have created. Click on assign script. Assign it the name of the function - hello.
Comments
Post a Comment