2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GoogleAppsScriptで関数から複数の値を返す

Posted at

はじめに

GoogleAppsScriptで処理の共通化をしたい。
関数から複数の戻り値を返す方法。

コード

// シートの全範囲のデータ取得
function getSpreadsheetDataRange(getSheetByName) {
  //  途中の処理は省略

  // 以下の結果を返却
  return {sheet, startRow, lastRow, numRows, numColumns, values};
}

function main() {
  // 結果を受け取り
  const {sheet, startRow, lastRow, numRows, numColumns, values} =   getSpreadsheetDataRange('送信先リスト');
}

参考

2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?