Skip to content

Instantly share code, notes, and snippets.

@tajuszk
Last active November 6, 2020 22:25
Show Gist options
  • Save tajuszk/55ea6e984083629298872955208f958b to your computer and use it in GitHub Desktop.
Save tajuszk/55ea6e984083629298872955208f958b to your computer and use it in GitHub Desktop.
// スプレッドシートのシートのデータを取得する(下記画像の赤、青まで)
const sheetName = 'シート1'
const sheetData = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);
// 全てのセルのデータを取得する(下記画像の緑、オレンジまで)
const startRow = 1
const startCol = 1
const endRow = sheetData.getLastRow()
const endCol = sheetData.getLastColumn()
const cells = sheetData.getRange(startRow, startCol, endRow, endCol).getValues();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment