Method: spreadsheets.values.update
HTTP リクエスト
PUT https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
spreadsheetId |
string
更新するスプレッドシートの ID。
|
range |
string
更新する値の A1 表記。
|
クエリ パラメータ
パラメータ |
valueInputOption |
enum (ValueInputOption )
入力データの解釈方法。
|
includeValuesInResponse |
boolean
更新されたセルの値を更新レスポンスに含めるかどうかを指定します。デフォルトでは、更新された値はレスポンスに含まれません。書き込む範囲が実際に書き込まれた範囲よりも大きかった場合、レスポンスにはリクエストした範囲内のすべての値が含まれます(末尾の空の行と列を除く)。
|
responseValueRenderOption |
enum (ValueRenderOption )
レスポンス内の値のレンダリング方法を決定します。デフォルトのレンダリング オプションは FORMATTED_VALUE です。
|
responseDateTimeRenderOption |
enum (DateTimeRenderOption )
レスポンスの日付、時刻、期間をどのようにレンダリングするかを決定します。responseValueRenderOption が FORMATTED_VALUE の場合は無視されます。デフォルトの dateTime レンダリング オプションは SERIAL_NUMBER です。
|
リクエスト本文
リクエストの本文には ValueRange
のインスタンスが含まれています。
レスポンスの本文
成功した場合、レスポンスの本文には UpdateValuesResponse
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープのいずれかが必要です。
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/spreadsheets
詳しくは、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-05 UTC。
[null,null,["最終更新日 2024-09-05 UTC。"],[[["This method allows you to set values within a specified range of a Google Sheet using the provided spreadsheet ID, range, and value input option."],["You can control data interpretation, response inclusion of updated values, value rendering, and date/time rendering through query parameters."],["The request body requires a ValueRange object defining the values to be set, while a successful response returns an UpdateValuesResponse object."],["Authorization is necessary using one of the specified OAuth scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.file`, or `https://www.googleapis.com/auth/spreadsheets`."]]],["This outlines updating spreadsheet values using a `PUT` request to the Google Sheets API. Key actions include specifying the `spreadsheetId` and `range` in the URL's path parameters. The request requires a `valueInputOption` in the query parameters to define data interpretation. Optional query parameters allow controlling response content and formatting. The request body uses `ValueRange`, and a successful response includes `UpdateValuesResponse`. Authorization requires specific OAuth scopes: `drive`, `drive.file`, or `spreadsheets`.\n"]]