-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmenus.gs
39 lines (37 loc) · 1.04 KB
/
menus.gs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Reports')
.addItem("Export All Students", "ExportStudents")
.addItem("Export Current Student", "export_pdf")
.addToUi()
}
/**
* Creates a trigger for when a spreadsheet opens.
*/
function createSpreadsheetOpenTrigger() {
var ss = SpreadsheetApp.openById(top.FILES.RBTRACKER);
ScriptApp.newTrigger('myFunction')
.forSpreadsheet(ss)
.onOpen()
.create();
}
//function onOpen() {
// var ui = SpreadsheetApp.getUi();
// // Or DocumentApp or FormApp.
// ui.createMenu('Custom Menu')
// .addItem('First item', 'menuItem1')
// .addSeparator()
// .addSubMenu(ui.createMenu('Sub-menu')
// .addItem('Second item', 'menuItem2'))
// .addToUi();
//}
//
//function menuItem1() {
// SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
// .alert('You clicked the first menu item!');
//}
//
//function menuItem2() {
// SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
// .alert('You clicked the second menu item!');
//}