Test a Google Sheet add-on

SoftTimur Source

I have created an add-on in Script Editor with Code.gs and Index.html. I choose Publish ==> Test as add-on... and then selected another google sheet in the dialog box. Clicking on Test opens that google sheet, but I don't see any taskpane that should be made by index.html, =myFunction() does not work either in cells.

Does anyone know how to test this add-on?

Edit 1: Code.gs:

function myFunction() {
  return 100


<!DOCTYPE html>
    <base target="_top">
    super add-on


answered 1 year ago Ritz #1

You can definitely test the sidebar add-on, in other sheet. You need to use the below script. Also, make sure you select INSTALLATION CONFIG as Installed & Enabled.

function onOpen() {
   var html = HtmlService.createHtmlOutputFromFile('index') //your html page name
      .setTitle('My custom sidebar')
  SpreadsheetApp.getUi() // Or DocumentApp or FormApp.

Currently, custom functions are not working in test add-on mode. There is already an issue reported for this and Google as accepted it. Check this.

comments powered by Disqus