LoginSignup
0
2

More than 5 years have passed since last update.

GAS(Google Apps Scripts)でスプレッドシートを利用する

Posted at

スクリプトからスプレッドシートを参照する

Container Bound Script(スプレッドシートに紐づいている) の場合

var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();

スプレッドシートに紐づいていないスクリプトの場合

var spreadsheet = SpreadsheetApp.openById('<キー>');

シートを取得する

シートを名前で指定して取得する

var sheet = spreadsheet.getSheetByName('<シート名>');

セルの値を取得する

行、列の番号を指定することで、セルの値を取得できます。

sheet.getRange( row, col ).getValue();
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2