-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmainMethods.js
62 lines (54 loc) · 1.72 KB
/
mainMethods.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
* GitHub https://github.com/tanaikech/DocsServiceApp<br>
* Library name
* @type {string}
* @const {string}
* @readonly
*/
const appName = "DocsServiceApp";
/**
* @param {String} id Spreasheet ID.
* @return {DocsServiceApp}
*/
function openBySpreadsheetId(id) {
return new SpreadsheetAppp(id);
}
/**
* @param {Object} blob Blob of Excel file (XLSX file).
* @return {DocsServiceApp}
*/
function openByExcelFileBlob(blob) {
return new ExcelApp(blob);
}
/**
* @param {String} id Document ID.
* @return {DocsServiceApp}
*/
function openByDocumentId(id) {
return new DocumentAppp(id);
}
/**
* @param {Object} blob Blob of Word file (DOCX file).
* @return {DocsServiceApp}
*/
function openByWordFileBlob(blob) {
return new WordApp(blob);
}
/**
* @param {object} object Object including parameter for createing new Google Spreadsheet.
* @return {string} Presentation ID of cerated Google Slides.
*/
function createNewSpreadsheetWithCustomHeaderFooter(object) {
return new SpreadsheetAppp("create").createNewSpreadsheetWithCustomHeaderFooter(object);
}
/**
* @param {object} object Object including parameter for createing new Google Slides.
* @return {string} Presentation ID of cerated Google Slides.
*/
function createNewSlidesWithPageSize(object) {
return new SlidesAppp("create").createNewSlidesWithPageSize(object);
}
// DriveApp.createFile() // This is used for automatically detected the scope of "https://www.googleapis.com/auth/drive"
// SpreadsheetApp.create() // This is used for automatically detected the scope of "https://www.googleapis.com/auth/spreadsheets"
// SlidesApp.create(name) // This is used for automatically detected the scope of "https://www.googleapis.com/auth/presentations"
;