v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1317262210.9 KB
spreadsheets

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}

Path parameters

spreadsheetIdstring required

The ID of the spreadsheet to update.

rangestring required

The A1 notation of the values to update.

Query parameters

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).

responseDateTimeRenderOption'SERIAL_NUMBER' | 'FORMATTED_STRING'

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.

responseValueRenderOption'FORMATTED_VALUE' | 'UNFORMATTED_VALUE' | 'FORMULA'

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

valueInputOption'INPUT_VALUE_OPTION_UNSPECIFIED' | 'RAW' | 'USER_ENTERED'

How the input data should be interpreted.

Request body

majorDimension'DIMENSION_UNSPECIFIED' | 'ROWS' | 'COLUMNS'

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.

rangestring

The range the values cover, in A1 notation. 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.

Response

Successful response