回答編集履歴
1
誤記修正
answer
CHANGED
@@ -39,9 +39,8 @@
|
|
39
39
|
let year = now.getFullYear();
|
40
40
|
let month = now.getMonth() + 1;
|
41
41
|
let date = now.getDate();
|
42
|
-
let hour = now.getHours();
|
43
42
|
|
44
|
-
// 9行目に現在年日
|
43
|
+
// 9行目に現在年月日を出力
|
45
44
|
let s = year + "年" + month + "月" + date + "日";
|
46
45
|
sheet.getRange(9, 2).setValue(s);
|
47
46
|
|
@@ -65,4 +64,4 @@
|
|
65
64
|
GAS特有であるスプレッドシートのクラスに関する公式の情報は、リファレンスを参照してください。
|
66
65
|
[Spreadsheet Service - Google Apps Script](https://developers.google.com/apps-script/reference/spreadsheet)
|
67
66
|
|
68
|
-
本質問はGoogle Apps Script、それも
|
67
|
+
本質問はGoogle Apps Script、それもGoogleスプレッドシートに関連したものですが、プログラムの流れの基本、考え方はExcel/VBAにも転用できるはずです。自力でプログラムを書けるようになれば、応用が効くのではないでしょうか。がんばってください。
|