-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
35 lines (28 loc) · 854 Bytes
/
test.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
function myFunction() {
var name = "**Type Name**: target-copy-options";
var regExp = new RegExp(/(\*\*|__)(.*?)(\*\*|__)/); // "i" is for case insensitive
Logger.log(regExp.test(name));
//var lastName = regExp.exec(name)[1];
//Logger.log(lastName); // Smith
}
function testLists() {
var jsonMessage = {'key1': 5, 'key2': 7};
var cells = [];
var cell = [];
cell.push(jsonMessage);
cells.push(cell);
Logger.log(cell);
Logger.log(cells);
}
function testStrings() {
s = 'abc';
Logger.log(s == true);
Logger.log(s == false);
}
function testProps() {
var action_id = '1QGb8xBl6tWLBkpBygtLdV1ncr8SOyiAhOQWw_dTROrc';
var spreadsheet = SpreadsheetApp.openById(action_id);
var sheetProps = spreadsheet.getSheetByName('props');
var propVals = sheetProps.getDataRange().getValues();
Logger.log(propVals[8][2]);
}