Skip to content

Instantly share code, notes, and snippets.

@mtdtks
Last active December 7, 2016 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtdtks/fd76d4271ed7ac12154872f444dda883 to your computer and use it in GitHub Desktop.
Save mtdtks/fd76d4271ed7ac12154872f444dda883 to your computer and use it in GitHub Desktop.
メニューに新しい項目を追加する
/**
*@メニュー"MenuName"に"testFunc"を追加
*/
function addMenuTestFunc() {
"use strict";
var spreadsheetObj = SpreadsheetApp.getActiveSpreadsheet();
var menuList = [];
menuList.push({
name : "TestFunc",
functionName : "testFunc"
});
spreadsheetObj.addMenu("MenuName", menuList);
}
/**
*@メニュー"MenuName"に"testFunc"を追加
*/
function addMenuTestFunc() {
"use strict";
var spreadsheetObj = SpreadsheetApp.getActiveSpreadsheet();
var menuList = [];
menuList.push({
name : "TestFunc",
functionName : "testFunc"
});
menuList.push({
name : "TestFunc2",
functionName : "testFunc2"
});
spreadsheetObj.addMenu("MenuName", menuList);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment