[GoogleAppsScript]コマンドにメニュー追加
function onOpen(){ var menu = [ {name: "メニュー名", functionName: "実行関数名"} ]; SpreadsheetApp.getActiveSpreadsheet().addMenu("コマンド",menu); }
function onOpen(){ var menu = [ {name: "メニュー名", functionName: "実行関数名"} ]; SpreadsheetApp.getActiveSpreadsheet().addMenu("コマンド",menu); }
function copy_values() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet(); var get_range; var set_range; for(var i = 4 ; i < 30 ; i+=2){ get_range = sheet.getRange("J"+i+":K"+i); set_range = sheet.getRange("J"+(i+1)+":K"+(i+1)); set_range.setValues(get_range.getValues()); } }