Appends values to a spreadsheet. The input range is used to search for
existing data and find a "table" within that range. Values will be
appended to the next row of the table, starting with the first column of
the table. See the guide
and sample
code
for specific details of how tables are detected and data is appended.
The caller must specify the spreadsheet ID, range, and a
valueInputOption. The valueInputOption
only controls how the input
data will be added to the sheet (column-wise or row-wise), it does not
influence what cell the data starts being written to.
Arguments
range
string
Required. The A1 notation of a range to search for a logical table of data. Values are appended after the last row of the table.
spreadsheetId
string
Required. The ID of the spreadsheet to update.
includeValuesInResponse
boolean
Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values.
insertDataOption
enum
How the input data should be inserted.
OVERWRITE
INSERT_ROWS
responseDateTimeRenderOption
enum
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.
SERIAL_NUMBER
FORMATTED_STRING
responseValueRenderOption
enum
Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.
FORMATTED_VALUE
A1
is 1.23
and A2
is =A1
and formatted as currency, then A2
would return "$1.23"
.UNFORMATTED_VALUE
A1
is 1.23
and A2
is =A1
and formatted as currency, then A2
would return the number 1.23
.FORMULA
A1
is 1.23
and A2
is =A1
and formatted as currency, then A2 would return "=A1"
.valueInputOption
enum
How the input data should be interpreted.
INPUT_VALUE_OPTION_UNSPECIFIED
RAW
USER_ENTERED
body
object ( ValueRange
)
Required.
Raised exceptions
ConnectionError
HttpError
TimeoutError
TypeError
ValueError
Response
If successful, the response contains an instance of AppendValuesResponse
.
Subworkflow snippet
Some fields might be optional or required. To identify required fields, refer to the API documentation .
YAML
- append : call : googleapis.sheets.v4.spreadsheets.values.append args : range : ... spreadsheetId : ... includeValuesInResponse : ... insertDataOption : ... responseDateTimeRenderOption : ... responseValueRenderOption : ... valueInputOption : ... body : majorDimension : ... range : ... values : ... result : appendResult
JSON
[ { "append" : { "call" : "googleapis.sheets.v4.spreadsheets.values.append" , "args" : { "range" : "..." , "spreadsheetId" : "..." , "includeValuesInResponse" : "..." , "insertDataOption" : "..." , "responseDateTimeRenderOption" : "..." , "responseValueRenderOption" : "..." , "valueInputOption" : "..." , "body" : { "majorDimension" : "..." , "range" : "..." , "values" : "..." } }, "result" : "appendResult" } } ]

