回答編集履歴
1
あ
answer
CHANGED
@@ -13,4 +13,17 @@
|
|
13
13
|
function getname(sheet_no) {
|
14
14
|
return SpreadsheetApp.getActive().getSheets()[sheet_no - 1].getName();
|
15
15
|
}
|
16
|
+
```
|
17
|
+
|
18
|
+
# 質問者さまのコードを無視して近しいことをやるなら
|
19
|
+
|
20
|
+
```javascript
|
21
|
+
function re_getname() {
|
22
|
+
const sheets = SpreadsheetApp.getActive().getSheets();
|
23
|
+
const dat = [];
|
24
|
+
for (var i = 1; i <= sheets.length; i++) {
|
25
|
+
dat.push([sheets[i].getName()]);
|
26
|
+
}
|
27
|
+
return dat;
|
28
|
+
}
|
16
29
|
```
|