Geography, asked by lalitadevibh1234, 17 days ago

. How Can you adign context in a spreadsheet









Answers

Answered by Anonymous
2

Answer:

1

You can create a menu with button that will run the script that you want using the onOpen function. See the Apps Script documentation.

function onOpen() {

var sheet = SpreadsheetApp.getActiveSpreadsheet();

var entries = [{

name : "Read Data",

functionName : "readRows"

}];

sheet.addMenu("Script Center Menu", entries);

};

You would then have some other function like this.

function readRows() {

This can execute any function you want, and you can have multiple menu items that do different things.

Note: onOpen sometimes takes a while to load, so wait 5 seconds.

Similar questions