younifyd
Menu

Sheets.spreadsheets.values.update

Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.

PUT/v4/spreadsheets/{spreadsheetId}/values/{range}

Use it in a workflow

  1. Add a step and choose the Google Sheets connector.
  2. Pick the Sheets.spreadsheets.values.update action (under spreadsheets).
  3. Fill in the fields below, then reference the result from later steps as {{sheetsSpreadsheetsValuesUpdate.response.data}}.

Request

Path parameters

spreadsheetIdstringrequired

The ID of the spreadsheet to update.

rangestringrequired

The [A1 notation](/sheets/api/guides/concepts#cell) of the values to update.

Query parameters

$.xgafvstring

V1 error format.

One of12

access_tokenstring

OAuth access token.

altstring

Data format for response.

One ofjsonmediaproto

callbackstring

JSONP

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

upload_protocolstring

Upload protocol for media (e.g. "raw", "multipart").

uploadTypestring

Legacy upload protocol for media (e.g. "media", "multipart").

includeValuesInResponseboolean

Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).

responseDateTimeRenderOptionstring

Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.

One ofSERIAL_NUMBERFORMATTED_STRING

responseValueRenderOptionstring

Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.

One ofFORMATTED_VALUEUNFORMATTED_VALUEFORMULA

valueInputOptionstring

How the input data should be interpreted.

One ofINPUT_VALUE_OPTION_UNSPECIFIEDRAWUSER_ENTERED

Request body

Enter the body as JSON in the step's Body field.

majorDimensionstring

The major dimension of the values. For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` will return `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return `[[1,3],[2,4]]`. For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. When writing, if this field is not set, it defaults to ROWS.

One ofDIMENSION_UNSPECIFIEDROWSCOLUMNS

rangestring

The range the values cover, in [A1 notation](/sheets/api/guides/concepts#cell). For output, this range indicates the entire requested range, even though the values will exclude trailing rows and columns. When appending values, this field represents the range to search for a table, after which values will be appended.

valuesarray<array<any>>

The data that was read or to be written. This is an array of arrays, the outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds with one cell. For output, empty trailing rows and columns will not be included. For input, supported value types are: bool, string, and double. Null values will be skipped. To set a cell to an empty value, set the string value to an empty string.

json
{
  "majorDimension": "DIMENSION_UNSPECIFIED",
  "range": "string",
  "values": [
    [
      null
    ]
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{sheetsSpreadsheetsValuesUpdate.response.data.<field>}}.

spreadsheetIdstring

The spreadsheet the updates were applied to.

updatedCellsinteger (int32)

The number of cells updated.

updatedColumnsinteger (int32)

The number of columns where at least one cell in the column was updated.

updatedDataobject

Data within a range of the spreadsheet.

majorDimensionstring

The major dimension of the values. For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` will return `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return `[[1,3],[2,4]]`. For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. When writing, if this field is not set, it defaults to ROWS.

One ofDIMENSION_UNSPECIFIEDROWSCOLUMNS

rangestring

The range the values cover, in [A1 notation](/sheets/api/guides/concepts#cell). For output, this range indicates the entire requested range, even though the values will exclude trailing rows and columns. When appending values, this field represents the range to search for a table, after which values will be appended.

valuesarray<array<any>>

The data that was read or to be written. This is an array of arrays, the outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds with one cell. For output, empty trailing rows and columns will not be included. For input, supported value types are: bool, string, and double. Null values will be skipped. To set a cell to an empty value, set the string value to an empty string.

updatedRangestring

The range (in A1 notation) that updates were applied to.

updatedRowsinteger (int32)

The number of rows where at least one cell in the row was updated.

json
{
  "spreadsheetId": "string",
  "updatedCells": 0,
  "updatedColumns": 0,
  "updatedData": {
    "majorDimension": "DIMENSION_UNSPECIFIED",
    "range": "string",
    "values": [
      [
        null
      ]
    ]
  },
  "updatedRange": "string",
  "updatedRows": 0
}

Need more? See the Google Sheets guide for connection setup and behaviour shared by every action.

Was this page helpful?
Sheets.spreadsheets.values.update — Google Sheets — Documentation