суббота, 7 января 2017 г.

gSheet.Calling our function

gSheet.Calling our function

Three ways to call the script from the google spreadsheet:

  1. Option to call the menu item "Tools" -> "Manage Scripts"


2017-01-07_09-55-24.png

2017-01-07_09-57-59.png






2.The second option - start button::

Select in the "Insert" menu, then "Drawing" ,  


paste on a sheet of drawing


The figure menu (displayed when you click on it, right click) choose "Set the script."


In the resulting text box displays the name of the function..

All. As a result, after pressing the Create button will run the script.
3. The third option - run through the item menu of the document:

Maybe add the item in the menu of the document, do it programmatically.

Add the code in our script:

declare the variable -

var ss = SpreadsheetApp.getActiveSpreadsheet();  

create your own menu -

ss.addMenu("Тест", [{name: "Тест", functionName: "myFunction"}]);


we obtain:


Комментариев нет:

Отправить комментарий