-
Notifications
You must be signed in to change notification settings - Fork 9
/
Code.gs
21 lines (19 loc) · 680 Bytes
/
Code.gs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function main() {
var html = HtmlService.createHtmlOutputFromFile("index");
SpreadsheetApp.getUi().showSidebar(html);
}
function getAuth() {
// DriveApp.createFile(blob) // This is used for adding the scope of "https://www.googleapis.com/auth/drive".
return ScriptApp.getOAuthToken();
}
// If you want to put the uploaded file information to the active Spreadsheet,
// please use the following function.
function putFileInf(obj) {
var lock = LockService.getDocumentLock();
if (lock.tryLock(5000)) {
SpreadsheetApp.getActiveSpreadsheet()
.getSheets()[0]
.appendRow([obj.name, obj.mimeType, obj.id]);
lock.releaseLock();
}
}