Google スプレッドシート ファイルにアクセスして作成する。このクラスは、スプレッドシート サービスの親クラスです。
プロパティ
プロパティ | タイプ | 説明 |
---|---|---|
AutoFillSeries | AutoFillSeries | 自動入力値の計算に使用される系列タイプを列挙します。 |
BandingTheme | BandingTheme | 考えられるバンディング テーマの列挙。 |
BooleanCriteria | BooleanCriteria | 条件付き書式のブール条件の列挙。 |
BorderStyle | BorderStyle | Range に枠線を設定するための有効なスタイルの列挙型。 |
ColorType | ColorType | 可能なカラータイプの列挙。 |
CopyPasteType | CopyPasteType | 可能な貼り付けタイプの列挙。 |
DataExecutionErrorCode | DataExecutionErrorCode | 取り得るデータ実行のエラーコードの列挙。 |
DataExecutionState | DataExecutionState | 可能なデータ実行状態の列挙。 |
DataSourceParameterType | DataSourceParameterType | 指定可能なデータソース パラメータの型の列挙型。 |
DataSourceRefreshScope | DataSourceRefreshScope | 可能なデータソース更新スコープの列挙。 |
DataSourceType | DataSourceType | データソース タイプの一覧。 |
DataValidationCriteria | DataValidationCriteria | 範囲に設定可能なデータ検証条件を表す列挙型。 |
DateTimeGroupingRuleType | DateTimeGroupingRuleType | 日時のグループ化ルールの列挙。 |
DeveloperMetadataLocationType | DeveloperMetadataLocationType | 可能なデベロッパー メタデータのロケーション タイプの列挙。 |
DeveloperMetadataVisibility | DeveloperMetadataVisibility | 可能性のあるデベロッパー メタデータの公開設定の列挙。 |
Dimension | Dimension | スプレッドシートに設定可能なディメンションの列挙。 |
Direction | Direction | 矢印キーを使用してスプレッドシート内で移動できる方向の列挙。 |
FrequencyType | FrequencyType | 可能なフリークエンシータイプの列挙。 |
GroupControlTogglePosition | GroupControlTogglePosition | グループ コントロールの切り替えに使用できる位置の列挙。 |
InterpolationType | InterpolationType | 条件付き形式のグラデーション補間型の列挙型。 |
PivotTableSummarizeFunction | PivotTableSummarizeFunction | ピボット テーブルで値を集計するために使用できる関数の列挙型。 |
PivotValueDisplayType | PivotValueDisplayType | ピボット値の表示方法を列挙します。 |
ProtectionType | ProtectionType | 編集から保護できるスプレッドシートの部分を表す列挙型。 |
RecalculationInterval | RecalculationInterval | スプレッドシートの再計算に使用できる間隔の列挙。 |
RelativeDate | RelativeDate | 日付ベースの BooleanCriteria で使用する値を計算するための相対的な日付オプションの列挙です。 |
SheetType | SheetType | スプレッドシート内に存在するさまざまな種類のスプレッドシートの列挙。 |
SortOrder | SortOrder | 並べ替え順序の列挙。 |
TextDirection | TextDirection | 有効なテキスト経路の列挙。 |
TextToColumnsDelimiter | TextToColumnsDelimiter | テキストを列に分割するプリセット区切り文字の列挙型。 |
ThemeColorType | ThemeColorType | 可能なテーマカラー型の列挙型。 |
ValueType | ValueType | スプレッドシート サービスの Range クラスから Range.getValue() と Range.getValues() によって返される値の型の列挙型。列挙値は、Number 、Boolean 、Date 、または String に追加されます。 |
WrapStrategy | WrapStrategy | セルのラップに使用される戦略の列挙。 |
Methods
詳細なドキュメント
create(name)
指定した名前で新しいスプレッドシートを作成します。
// The code below creates a new spreadsheet "Finances" and logs the URL for it var ssNew = SpreadsheetApp.create("Finances"); Logger.log(ssNew.getUrl());
パラメータ
名前 | 型 | 説明 |
---|---|---|
name | String | スプレッドシートの名前。 |
復路
Spreadsheet
- 新しいスプレッドシート
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets
create(name, rows, columns)
指定した名前と行および列数の新しいスプレッドシートを作成します。
// The code below creates a new spreadsheet "Finances" with 50 rows and 5 columns and logs the // URL for it var ssNew = SpreadsheetApp.create("Finances", 50, 5); Logger.log(ssNew.getUrl());
パラメータ
名前 | 型 | 説明 |
---|---|---|
name | String | スプレッドシートの名前。 |
rows | Integer | スプレッドシートの行数。 |
columns | Integer | スプレッドシートの列数。 |
復路
Spreadsheet
- 新しいスプレッドシート
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets
enableAllDataSourcesExecution()
すべてのタイプのデータソースに対して、データの実行を有効にします。
データソースの種類がオンになっていないと、データの実行で例外がスローされます。このメソッドを使用して、すべてのデータソース タイプでデータ実行を有効にします。
// Turns data execution on for all types of data sources. SpreadsheetApp.enableAllDataSourcesExecution(); // Opens the spreadsheet file by its ID. If you created your script from a Google Sheets file, // use SpreadsheetApp.getActiveSpreadsheet(). // TODO(developer): Replace the ID with your own. const ss = SpreadsheetApp.openById('abc123456'); // Gets the first data source sheet in the spreadsheet and refreshes the data. ss.getDataSourceSheets()[0].refreshData();
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/bigquery.readonly
enableBigQueryExecution()
BigQuery データソースのデータ実行を有効にします。
BigQuery データソースのデータ実行がオンでない場合、例外がスローされます。
// Turns data execution on for BigQuery data sources. SpreadsheetApp.enableBigQueryExecution(); // Opens the spreadsheet file by its ID. If you created your script from a Google Sheets file, // use SpreadsheetApp.getActiveSpreadsheet(). // TODO(developer): Replace the ID with your own. const ss = SpreadsheetApp.openById('abc123456'); // Gets the first data source sheet in the spreadsheet and refreshes the BigQuery data. ss.getDataSourceSheets()[0].refreshData();
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/bigquery.readonly
flush()
保留中のスプレッドシートの変更をすべて適用します。
Range.getValue() に複数の呼び出しを行う場合など、スプレッドシート オペレーションはパフォーマンス向上のためにバンドルされる場合があります。ただし、スクリプトの実行中にユーザーデータを表示するなど、保留中のすべての変更をすぐに行う必要がある場合もあります。
// The code below changes the background color of cells A1 and B1 twenty times. You should be // able to see the updates live in the spreadsheet. If flush() is not called, the updates may // be applied live or may all be applied at once when the script completes. function colors() { var sheet = SpreadsheetApp.getActiveSheet(); for (var i = 0; i < 20; i++) { if ((i % 2) == 0) { sheet.getRange('A1').setBackground('green'); sheet.getRange('B1').setBackground('red'); } else { sheet.getRange('A1').setBackground('red'); sheet.getRange('B1').setBackground('green'); } SpreadsheetApp.flush(); } }
getActive()
現在アクティブなスプレッドシートを返します(存在しない場合)。null
スプレッドシートのコンテキストで実行される関数は、この関数を呼び出して、対応するスプレッドシート オブジェクトへの参照を取得できます。
// The code below logs the URL for the active spreadsheet. Logger.log(SpreadsheetApp.getActive().getUrl());
復路
Spreadsheet
- 有効なスプレッドシート オブジェクト
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getActiveRange()
アクティブ シート内の選択された範囲を返します。アクティブな範囲がない場合は null
を返します。複数の範囲が選択されている場合、このメソッドは最後に選択した範囲のみを返します。
これは通常、ユーザーがアクティブ シートで選択した範囲を指しますが、カスタム関数では、セルが再計算されることを意味します。
// The code below logs the background color for the active range. var colorObject = SpreadsheetApp.getActiveRange().getBackgroundObject(); // Assume the color has ColorType.RGB. Logger.log(colorObject.asRgbColor().asHexString());
復路
Range
- アクティブ範囲。
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getActiveRangeList()
アクティブ シート内のアクティブな範囲のリストを返します。範囲が選択されていない場合は null
を返します。現在ハイライト表示されているセルを含むアクティブな範囲が、リストの最後に配置されます。
単一の範囲が選択されている場合、これは getActiveRange()
呼び出しとして機能します。
// Returns the list of active ranges. var rangeList = SpreadsheetApp.getActiveRangeList();
復路
RangeList
- アクティブ範囲のリスト
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getActiveSheet()
スプレッドシート内のアクティブなシートを取得します。
スプレッドシートのアクティブ シートは、スプレッドシートの UI に表示されているシートです。
// The code below logs the name of the active sheet. Logger.log(SpreadsheetApp.getActiveSheet().getName());
復路
Sheet
- アクティブなシート オブジェクト
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getActiveSpreadsheet()
現在アクティブなスプレッドシートを返します(存在しない場合)。null
スプレッドシートのコンテキストで実行される関数は、この関数を呼び出して、対応する Spreadsheet
オブジェクトへの参照を取得できます。
// The code below logs the URL for the active spreadsheet. Logger.log(SpreadsheetApp.getActiveSpreadsheet().getUrl());
復路
Spreadsheet
- 有効なスプレッドシート オブジェクト
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getCurrentCell()
アクティブ シートでアクティブな範囲の 1 つで選択された現在のセル(ハイライト表示されたセル)を返します。現在のセルがない場合は、null
を返します。
// Returns the current highlighted cell in the one of the active ranges. var currentCell = SpreadsheetApp.getCurrentCell();
復路
Range
- 現在のセル
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSelection()
getUi()
メニュー、ダイアログ、サイドバーなどの機能を追加できるスプレッドシートのユーザー インターフェース環境のインスタンスを返します。スクリプトは、開いているスプレッドシートの現在のインスタンスの UI とやりとりできます。ただし、スクリプトはスプレッドシートにバインドされている場合に限ります。詳しくは、メニューおよびダイアログとサイドバーに関するガイドをご覧ください。
// Add a custom menu to the active spreadsheet, including a separator and a sub-menu. function onOpen(e) { SpreadsheetApp.getUi() .createMenu('My Menu') .addItem('My menu item', 'myFunction') .addSeparator() .addSubMenu(SpreadsheetApp.getUi().createMenu('My sub-menu') .addItem('One sub-menu item', 'mySecondFunction') .addItem('Another sub-menu item', 'myThirdFunction')) .addToUi(); }
復路
Ui
- このスプレッドシートのユーザー インターフェース環境のインスタンス
newCellImage()
CellImage
のビルダーを作成します。
// Opens the spreadsheet file by its URL. If you created your script from within a // Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet() instead. // TODO(developer): Replace the URL with your own. const ss = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/abc123456/edit'); // Gets Sheet1 by its name. const sheet = ss.getSheetByName('Sheet1'); // Gets cell A1 on Sheet1. const range = sheet.getRange('A1'); // Builds an image using a source URL. const cellImage = SpreadsheetApp.newCellImage() .setSourceUrl('https://www.gstatic.com/images/branding/productlogos/apps_script/v10/web-64dp/logo_apps_script_color_1x_web_64dp.png') .build(); // Sets the image in cell A1. range.setValue(cellImage);
復路
CellImageBuilder
- 新しいビルダー。
newColor()
Color
のビルダーを作成します。
var rgbColor = SpreadsheetApp.newColor().setRgbColor("#FF0000").build();
復路
ColorBuilder
- 新しいビルダー。
newConditionalFormatRule()
条件付き書式ルールのビルダーを作成します。
// Adds a conditional format rule to a sheet that causes all cells in range A1:B3 to turn red // if they contain a number between 1 and 10. var sheet = SpreadsheetApp.getActive().getActiveSheet(); var range = sheet.getRange('A1:B3'); var rule = SpreadsheetApp.newConditionalFormatRule() .whenNumberBetween(1, 10) .setBackground("#FF0000") .setRanges([range]) .build() var rules = sheet.getConditionalFormatRules(); rules.push(rule); sheet.setConditionalFormatRules(rules);
復路
ConditionalFormatRuleBuilder
- 新しいビルダー。
newDataSourceSpec()
DataSourceSpec
のビルダーを作成します。
// Opens the spreadsheet file by its URL. If you created your script from within a // Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet() instead. // TODO(developer): Replace the URL with your own. const ss = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/abc123456/edit'); // Enables BigQuery. SpreadsheetApp.enableBigQueryExecution(); // Builds a data source specification. // TODO (developer): Update the project ID to your own Google Cloud project ID. const dataSourceSpec = SpreadsheetApp.newDataSourceSpec() .asBigQuery() .setProjectId('project-id-1') .setTableProjectId('bigquery-public-data') .setDatasetId('ncaa_basketball') .setTableId('mbb_historical_teams_games') .build(); // Adds the data source and its data to the spreadsheet. ss.insertDataSourceSheet(dataSourceSpec);
復路
DataSourceSpecBuilder
- 新しいビルダー。
newDataValidation()
データ検証ルールのビルダーを作成します。
var cell = SpreadsheetApp.getActive().getRange('A1'); var rule = SpreadsheetApp.newDataValidation() .requireNumberBetween(1, 100) .setAllowInvalid(false) .setHelpText('Number must be between 1 and 100.') .build(); cell.setDataValidation(rule);
復路
DataValidationBuilder
- 新しいビルダー。
newFilterCriteria()
FilterCriteria
のビルダーを作成します。
// Opens the spreadsheet file by its URL. If you created your script from within a // Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet() instead. // TODO(developer): Replace the URL with your own. const ss = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/abc123456/edit'); // Gets Sheet1 by its name. const sheet = ss.getSheetByName('Sheet1'); // Sets the range to A1:D20. const range = sheet.getRange('A1:D20'); // Creates a filter and applies it to the specified range. range.createFilter(); // Gets the current filter for the range and creates filter criteria that only shows cells // that aren't empty. const filter = range.getFilter(); const criteria = SpreadsheetApp.newFilterCriteria().whenCellNotEmpty().build(); // Sets the criteria to column C. filter.setColumnFilterCriteria(3, criteria);
復路
FilterCriteriaBuilder
- 新しいビルダー
newRichTextValue()
リッチテキスト値のビルダーを作成します。
// Sets cell A1 to have the text "Hello world", with "Hello" bolded. var cell = SpreadsheetApp.getActive().getRange('A1'); var bold = SpreadsheetApp.newTextStyle().setBold(true).build(); var value = SpreadsheetApp.newRichTextValue() .setText("Hello world") .setTextStyle(0, 5, bold) .build(); cell.setRichTextValue(value);
復路
RichTextValueBuilder
- 新しいビルダー。
newTextStyle()
テキスト スタイルのビルダーを作成します。
// Sets range A1:B3 to have red, size 22, bolded, underlined text. var range = SpreadsheetApp.getActive().getRange('A1:B3'); var style = SpreadsheetApp.newTextStyle() .setForegroundColor("red") .setFontSize(22) .setBold(true) .setUnderline(true) .build(); range.setTextStyle(style);
復路
TextStyleBuilder
- 新しいビルダー。
open(file)
指定したファイル オブジェクトに対応するスプレッドシートを開きます。
// Get any starred spreadsheets from Google Drive, then open the spreadsheets and log the name // of the first sheet within each spreadsheet. var files = DriveApp.searchFiles( 'starred = true and mimeType = "' + MimeType.GOOGLE_SHEETS + '"'); while (files.hasNext()) { var spreadsheet = SpreadsheetApp.open(files.next()); var sheet = spreadsheet.getSheets()[0]; Logger.log(sheet.getName()); }
パラメータ
名前 | 型 | 説明 |
---|---|---|
file | File | 開くファイル。 |
復路
Spreadsheet
- スプレッドシート
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets
openById(id)
指定された ID のスプレッドシートを開きます。スプレッドシート ID は URL から抽出できます。たとえば、URL https://docs.google.com/spreadsheets/d/abc1234567/edit#gid=0
のスプレッドシート ID は「abc1234567」です。
// The code below opens a spreadsheet using its ID and logs the name for it. // Note that the spreadsheet is NOT physically opened on the client side. // It is opened on the server only (for modification by the script). var ss = SpreadsheetApp.openById("abc1234567"); Logger.log(ss.getName());
パラメータ
名前 | 型 | 説明 |
---|---|---|
id | String | スプレッドシートの一意の識別子。 |
復路
Spreadsheet
- 指定された ID のスプレッドシート オブジェクト
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets
openByUrl(url)
指定された URL でスプレッドシートを開きます。URL が存在しない場合、またはユーザーに URL へのアクセス権限がない場合は、スクリプト例外をスローします。
// Opens a spreadsheet by its URL and logs its name. // Note that the spreadsheet doesn't physically open on the client side. // It opens on the server only (for modification by the script). var ss = SpreadsheetApp.openByUrl( 'https://docs.google.com/spreadsheets/d/abc1234567/edit'); console.log(ss.getName());
パラメータ
名前 | 型 | 説明 |
---|---|---|
url | String | スプレッドシートの URL。 |
復路
Spreadsheet
- 指定された URL のスプレッドシート オブジェクト。
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets
setActiveRange(range)
指定された範囲を active range
に設定し、左上のセルを current cell
として設定します。
スプレッドシート UI で、選択した範囲を含むシートを表示し、選択した範囲で定義されているセルを選択します。
// The code below sets range C1:D4 in the first sheet as the active range. var range = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0].getRange('C1:D4'); SpreadsheetApp.setActiveRange(range); var selection = SpreadsheetApp.getSelection(); // Current cell: C1 var currentCell = selection.getCurrentCell(); // Active Range: C1:D4 var activeRange = selection.getActiveRange();
パラメータ
名前 | 型 | 説明 |
---|---|---|
range | Range | アクティブ範囲にする範囲を指定します。 |
復路
Range
- 新しいアクティブ範囲
setActiveRangeList(rangeList)
指定した範囲のリストを active ranges
に設定します。リストの最後の範囲は active range
に設定されます。
// The code below sets ranges [D4, B2:C4] in the active sheet as the active ranges. var rangeList = SpreadsheetApp.getActiveSheet().getRanges(['D4', 'B2:C4']); SpreadsheetApp.setActiveRangeList(rangeList); var selection = SpreadsheetApp.getSelection(); // Current cell: B2 var currentCell = selection.getCurrentCell(); // Active range: B2:C4 var activeRange = selection.getActiveRange(); // Active range list: [D4, B2:C4] var activeRangeList = selection.getActiveRangeList();
パラメータ
名前 | 型 | 説明 |
---|---|---|
rangeList | RangeList | 選択する範囲のリスト。 |
復路
RangeList
- 新しく選択された範囲のリスト。
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setActiveSheet(sheet)
スプレッドシートにアクティブ シートを設定します。選択したシートは、別のスプレッドシートに属していない限り、Google スプレッドシートの UI に表示されます。
// The code below makes the 2nd sheet active in the active spreadsheet. var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); SpreadsheetApp.setActiveSheet(spreadsheet.getSheets()[1]);
パラメータ
名前 | 型 | 説明 |
---|---|---|
sheet | Sheet | 新しいアクティブ シート |
復路
Sheet
- 新しいアクティブ シートにされたシート。
setActiveSheet(sheet, restoreSelection)
スプレッドシート内のアクティブなシートを設定します。スプレッドシート内で最新の選択内容を復元することもできます。シートが別のスプレッドシートに属している場合を除き、Google スプレッドシート UI は選択されたシートを表示します。
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); var firstSheet = spreadsheet.getSheets()[0]; var secondSheet = spreadsheet.getSheets()[1]; // Set the first sheet as the active sheet and select the range D4:F4. spreadsheet.setActiveSheet(firstSheet).getRange('D4:F4').activate(); // Switch to the second sheet to do some work. spreadsheet.setActiveSheet(secondSheet); // Switch back to first sheet, and restore its selection. spreadsheet.setActiveSheet(firstSheet, true); // The selection of first sheet is restored, and it logs D4:F4 var range = spreadsheet.getActiveSheet().getSelection().getActiveRange(); Logger.log(range.getA1Notation());
パラメータ
名前 | 型 | 説明 |
---|---|---|
sheet | Sheet | 新しいアクティブ シート |
restoreSelection | Boolean | true の場合、新しいシートがアクティブになるときに新しいアクティブなシートの最新の選択内容を再度選択します。false の場合、現在の選択を変更せずに新しいシートがアクティブになります。 |
復路
Sheet
- 新しいアクティブ シート
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setActiveSpreadsheet(newActiveSpreadsheet)
有効なスプレッドシートを設定します。
// The code below makes the spreadsheet with key "1234567890" the active spreadsheet var ss = SpreadsheetApp.openById("1234567890"); SpreadsheetApp.setActiveSpreadsheet(ss);
パラメータ
名前 | 型 | 説明 |
---|---|---|
newActiveSpreadsheet | Spreadsheet | 現在のスプレッドシートとするスプレッドシート。 |
setCurrentCell(cell)
指定したセルを current cell
に設定します。
指定したセルがすでに選択範囲内に存在する場合、その範囲は、そのセルを現在のセルとしてアクティブ範囲になります。
選択したセルが選択した範囲にない場合は、既存の選択項目が削除され、そのセルが現在のセルおよびアクティブ範囲になります。
注: 指定する Range
は 1 つのセルで構成する必要があります。そうでない場合、このメソッドは例外をスローします。
// The code below sets the cell B5 in the first sheet as the current cell. var cell = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0].getRange('B5'); SpreadsheetApp.setCurrentCell(cell); var selection = SpreadsheetApp.getSelection(); // Current cell: B5 var currentCell = selection.getCurrentCell();
パラメータ
名前 | 型 | 説明 |
---|---|---|
cell | Range | 現在のセルとして設定するセル。 |
復路
Range
- 新しく設定された現在のセル
承認
この方法を使用するスクリプトには、次の 1 つ以上のスコープで承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets