blob: 7807a4f4325f0b5ee5ac47833d3b62b83a637d9b [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="sheets_v4.html">Google Sheets API</a> . <a href="sheets_v4.spreadsheets.html">spreadsheets</a> . <a href="sheets_v4.spreadsheets.values.html">values</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#append">append(spreadsheetId, range, body=None, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, insertDataOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070079<p class="firstline">Appends values to a spreadsheet. The input range is used to search for</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#batchClear">batchClear(spreadsheetId, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Clears one or more ranges of values from a spreadsheet.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#batchClearByDataFilter">batchClearByDataFilter(spreadsheetId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Clears one or more ranges of values from a spreadsheet.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#batchGet">batchGet(spreadsheetId, valueRenderOption=None, ranges=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070088<p class="firstline">Returns one or more ranges of values from a spreadsheet.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#batchGetByDataFilter">batchGetByDataFilter(spreadsheetId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Returns one or more ranges of values that match the specified data filters.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#batchUpdate">batchUpdate(spreadsheetId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070094<p class="firstline">Sets values in one or more ranges of a spreadsheet.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#batchUpdateByDataFilter">batchUpdateByDataFilter(spreadsheetId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Sets values in one or more ranges of a spreadsheet.</p>
98<p class="toc_element">
99 <code><a href="#clear">clear(spreadsheetId, range, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Clears values from a spreadsheet.</p>
101<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#get">get(spreadsheetId, range, valueRenderOption=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700103<p class="firstline">Returns a range of values from a spreadsheet.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#update">update(spreadsheetId, range, body=None, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700106<p class="firstline">Sets values in a range of a spreadsheet.</p>
107<h3>Method Details</h3>
108<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code class="details" id="append">append(spreadsheetId, range, body=None, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, insertDataOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700110 <pre>Appends values to a spreadsheet. The input range is used to search for
111existing data and find a "table" within that range. Values will be
112appended to the next row of the table, starting with the first column of
113the table. See the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400114[guide](/sheets/api/guides/values#appending_values)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700115and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116[sample code](/sheets/api/samples/writing#append_values)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700117for specific details of how tables are detected and data is appended.
118
119The caller must specify the spreadsheet ID, range, and
120a valueInputOption. The `valueInputOption` only
121controls how the input data will be added to the sheet (column-wise or
122row-wise), it does not influence what cell the data starts being written
123to.
124
125Args:
126 spreadsheetId: string, The ID of the spreadsheet to update. (required)
127 range: string, The A1 notation of a range to search for a logical table of data.
Dan O'Mearadd494642020-05-01 07:42:23 -0700128Values are appended after the last row of the table. (required)
129 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700130 The object takes the form of:
131
132{ # Data within a range of the spreadsheet.
133 "range": "A String", # The range the values cover, in A1 notation.
134 # For output, this range indicates the entire requested range,
135 # even though the values will exclude trailing rows and columns.
136 # When appending values, this field represents the range to search for a
137 # table, after which values will be appended.
138 "values": [ # The data that was read or to be written. This is an array of arrays,
139 # the outer array representing all the data and each inner array
140 # representing a major dimension. Each item in the inner array
141 # corresponds with one cell.
142 #
143 # For output, empty trailing rows and columns will not be included.
144 #
145 # For input, supported value types are: bool, string, and double.
146 # Null values will be skipped.
147 # To set a cell to an empty value, set the string value to an empty string.
148 [
149 "",
150 ],
151 ],
152 "majorDimension": "A String", # The major dimension of the values.
153 #
154 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
155 # then requesting `range=A1:B2,majorDimension=ROWS` will return
156 # `[[1,2],[3,4]]`,
157 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
158 # `[[1,3],[2,4]]`.
159 #
160 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
161 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
162 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
163 #
164 # When writing, if this field is not set, it defaults to ROWS.
165}
166
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700167 valueInputOption: string, How the input data should be interpreted.
168 x__xgafv: string, V1 error format.
169 Allowed values
170 1 - v1 error format
171 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800172 responseValueRenderOption: string, Determines how values in the response should be rendered.
173The default render option is ValueRenderOption.FORMATTED_VALUE.
174 insertDataOption: string, How the input data should be inserted.
175 includeValuesInResponse: boolean, Determines if the update response should include the values
176of the cells that were appended. By default, responses
177do not include the updated values.
178 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be
179rendered. This is ignored if response_value_render_option is
180FORMATTED_VALUE.
181The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700182
183Returns:
184 An object of the form:
185
186 { # The response when updating a range of values in a spreadsheet.
187 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
188 "tableRange": "A String", # The range (in A1 notation) of the table that values are being appended to
189 # (before the values were appended).
190 # Empty if no table was found.
191 "updates": { # The response when updating a range of values in a spreadsheet. # Information about the updates that were applied.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
Dan O'Mearadd494642020-05-01 07:42:23 -0700193 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700194 "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800195 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
196 # This is only included if the request's `includeValuesInResponse` field
197 # was `true`.
198 "range": "A String", # The range the values cover, in A1 notation.
199 # For output, this range indicates the entire requested range,
200 # even though the values will exclude trailing rows and columns.
201 # When appending values, this field represents the range to search for a
202 # table, after which values will be appended.
203 "values": [ # The data that was read or to be written. This is an array of arrays,
204 # the outer array representing all the data and each inner array
205 # representing a major dimension. Each item in the inner array
206 # corresponds with one cell.
207 #
208 # For output, empty trailing rows and columns will not be included.
209 #
210 # For input, supported value types are: bool, string, and double.
211 # Null values will be skipped.
212 # To set a cell to an empty value, set the string value to an empty string.
213 [
214 "",
215 ],
216 ],
217 "majorDimension": "A String", # The major dimension of the values.
218 #
219 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
220 # then requesting `range=A1:B2,majorDimension=ROWS` will return
221 # `[[1,2],[3,4]]`,
222 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
223 # `[[1,3],[2,4]]`.
224 #
225 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
226 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
227 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
228 #
229 # When writing, if this field is not set, it defaults to ROWS.
230 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700231 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800232 "updatedCells": 42, # The number of cells updated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700233 },
234 }</pre>
235</div>
236
237<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700238 <code class="details" id="batchClear">batchClear(spreadsheetId, body=None, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700239 <pre>Clears one or more ranges of values from a spreadsheet.
240The caller must specify the spreadsheet ID and one or more ranges.
241Only values are cleared -- all other properties of the cell (such as
242formatting, data validation, etc..) are kept.
243
244Args:
245 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700247 The object takes the form of:
248
249{ # The request for clearing more than one range of values in a spreadsheet.
250 "ranges": [ # The ranges to clear, in A1 notation.
251 "A String",
252 ],
253 }
254
255 x__xgafv: string, V1 error format.
256 Allowed values
257 1 - v1 error format
258 2 - v2 error format
259
260Returns:
261 An object of the form:
262
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400263 { # The response when clearing a range of values in a spreadsheet.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700264 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 "clearedRanges": [ # The ranges that were cleared, in A1 notation. If the requests are for an
266 # unbounded range or a ranger larger than the bounds of the sheet, this is
267 # the actual ranges that were cleared, bounded to the sheet's limits.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700268 "A String",
269 ],
270 }</pre>
271</div>
272
273<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 <code class="details" id="batchClearByDataFilter">batchClearByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 <pre>Clears one or more ranges of values from a spreadsheet.
276The caller must specify the spreadsheet ID and one or more
277DataFilters. Ranges matching any of the specified data
278filters will be cleared. Only values are cleared -- all other properties
279of the cell (such as formatting, data validation, etc..) are kept.
280
281Args:
282 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 The object takes the form of:
285
286{ # The request for clearing more than one range selected by a
287 # DataFilter in a spreadsheet.
288 "dataFilters": [ # The DataFilters used to determine which ranges to clear.
289 { # Filter that describes what data should be selected or returned from a
290 # request.
291 "developerMetadataLookup": { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
292 # described by this DeveloperMetadataLookup.
293 # example, if only a metadata ID is specified this considers the
294 # DeveloperMetadata with that particular unique ID. If a metadata key is
295 # specified, this considers all developer metadata with that key. If a
296 # key, visibility, and location type are all specified, this considers all
297 # developer metadata with that key and visibility that are associated with a
298 # location of that type. In general, this
299 # selects all DeveloperMetadata that matches the intersection of all the
300 # specified fields; any field or combination of fields may be specified.
301 "metadataLocation": { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
302 # the specified location. This field either matches exact locations or all
303 # intersecting locations according the specified
304 # locationMatchingStrategy.
305 "locationType": "A String", # The type of location this object represents. This field is read-only.
306 "dimensionRange": { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
307 # a dimension. The specified DimensionRange must represent a single row
308 # or column; it cannot be unbounded or span multiple rows or columns.
309 # All indexes are zero-based.
310 # Indexes are half open: the start index is inclusive
311 # and the end index is exclusive.
312 # Missing indexes indicate the range is unbounded on that side.
313 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
314 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
315 "sheetId": 42, # The sheet this span is on.
316 "dimension": "A String", # The dimension of the span.
317 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet.
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 },
321 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching
322 # DeveloperMetadata.metadata_value.
323 "locationMatchingStrategy": "A String", # Determines how this lookup matches the location. If this field is
324 # specified as EXACT, only developer metadata associated on the exact
325 # location specified is matched. If this field is specified to INTERSECTING,
326 # developer metadata associated on intersecting locations is also
327 # matched. If left unspecified, this field assumes a default value of
328 # INTERSECTING.
329 # If this field is specified, a metadataLocation
330 # must also be specified.
331 "locationType": "A String", # Limits the selected developer metadata to those entries which are
332 # associated with locations of the specified type. For example, when this
333 # field is specified as ROW this lookup
334 # only considers developer metadata associated on rows. If the field is left
335 # unspecified, all location types are considered. This field cannot be
336 # specified as SPREADSHEET when
337 # the locationMatchingStrategy
338 # is specified as INTERSECTING or when the
339 # metadataLocation is specified as a
340 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
341 # developer metadata location. This field also must be left unspecified when
342 # the locationMatchingStrategy
343 # is specified as EXACT.
344 "metadataId": 42, # Limits the selected developer metadata to that which has a matching
345 # DeveloperMetadata.metadata_id.
346 "visibility": "A String", # Limits the selected developer metadata to that which has a matching
347 # DeveloperMetadata.visibility. If left unspecified, all developer
348 # metadata visibile to the requesting project is considered.
349 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching
350 # DeveloperMetadata.metadata_key.
351 },
352 "a1Range": "A String", # Selects data that matches the specified A1 range.
353 "gridRange": { # A range on a sheet. # Selects data that matches the range described by the GridRange.
354 # All indexes are zero-based.
355 # Indexes are half open, e.g the start index is inclusive
356 # and the end index is exclusive -- [start_index, end_index).
357 # Missing indexes indicate the range is unbounded on that side.
358 #
359 # For example, if `"Sheet1"` is sheet ID 0, then:
360 #
361 # `Sheet1!A1:A1 == sheet_id: 0,
362 # start_row_index: 0, end_row_index: 1,
363 # start_column_index: 0, end_column_index: 1`
364 #
365 # `Sheet1!A3:B4 == sheet_id: 0,
366 # start_row_index: 2, end_row_index: 4,
367 # start_column_index: 0, end_column_index: 2`
368 #
369 # `Sheet1!A:B == sheet_id: 0,
370 # start_column_index: 0, end_column_index: 2`
371 #
372 # `Sheet1!A5:B == sheet_id: 0,
373 # start_row_index: 4,
374 # start_column_index: 0, end_column_index: 2`
375 #
376 # `Sheet1 == sheet_id:0`
377 #
378 # The start index must always be less than or equal to the end index.
379 # If the start index equals the end index, then the range is empty.
380 # Empty ranges are typically not meaningful and are usually rendered in the
381 # UI as `#REF!`.
382 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
383 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
384 "sheetId": 42, # The sheet this range is on.
385 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
386 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
387 },
388 },
389 ],
390 }
391
392 x__xgafv: string, V1 error format.
393 Allowed values
394 1 - v1 error format
395 2 - v2 error format
396
397Returns:
398 An object of the form:
399
400 { # The response when clearing a range of values selected with
401 # DataFilters in a spreadsheet.
402 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Dan O'Mearadd494642020-05-01 07:42:23 -0700403 "clearedRanges": [ # The ranges that were cleared, in A1 notation. If the requests are for an
404 # unbounded range or a ranger larger than the bounds of the sheet, this is
405 # the actual ranges that were cleared, bounded to the sheet's limits.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 "A String",
407 ],
408 }</pre>
409</div>
410
411<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700412 <code class="details" id="batchGet">batchGet(spreadsheetId, valueRenderOption=None, ranges=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700413 <pre>Returns one or more ranges of values from a spreadsheet.
414The caller must specify the spreadsheet ID and one or more ranges.
415
416Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700417 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 valueRenderOption: string, How values should be represented in the output.
419The default render option is ValueRenderOption.FORMATTED_VALUE.
Dan O'Mearadd494642020-05-01 07:42:23 -0700420 ranges: string, The A1 notation of the values to retrieve. (repeated)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700421 majorDimension: string, The major dimension that results should use.
422
423For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
Dan O'Mearadd494642020-05-01 07:42:23 -0700424then requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`,
425whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700426`[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700427 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700428This is ignored if value_render_option is
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700429FORMATTED_VALUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800430The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700431 x__xgafv: string, V1 error format.
432 Allowed values
433 1 - v1 error format
434 2 - v2 error format
435
436Returns:
437 An object of the form:
438
439 { # The response when retrieving more than one range of values in a spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700440 "spreadsheetId": "A String", # The ID of the spreadsheet the data was retrieved from.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700441 "valueRanges": [ # The requested values. The order of the ValueRanges is the same as the
442 # order of the requested ranges.
443 { # Data within a range of the spreadsheet.
444 "range": "A String", # The range the values cover, in A1 notation.
445 # For output, this range indicates the entire requested range,
446 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700447 # When appending values, this field represents the range to search for a
448 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700449 "values": [ # The data that was read or to be written. This is an array of arrays,
450 # the outer array representing all the data and each inner array
451 # representing a major dimension. Each item in the inner array
452 # corresponds with one cell.
453 #
454 # For output, empty trailing rows and columns will not be included.
455 #
456 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700457 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700458 # To set a cell to an empty value, set the string value to an empty string.
459 [
460 "",
461 ],
462 ],
463 "majorDimension": "A String", # The major dimension of the values.
464 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700465 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
466 # then requesting `range=A1:B2,majorDimension=ROWS` will return
467 # `[[1,2],[3,4]]`,
468 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
469 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700470 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700471 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
472 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
473 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700474 #
475 # When writing, if this field is not set, it defaults to ROWS.
476 },
477 ],
478 }</pre>
479</div>
480
481<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 <code class="details" id="batchGetByDataFilter">batchGetByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 <pre>Returns one or more ranges of values that match the specified data filters.
484The caller must specify the spreadsheet ID and one or more
485DataFilters. Ranges that match any of the data filters in
486the request will be returned.
487
488Args:
489 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700490 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 The object takes the form of:
492
493{ # The request for retrieving a range of values in a spreadsheet selected by a
494 # set of DataFilters.
495 "dateTimeRenderOption": "A String", # How dates, times, and durations should be represented in the output.
496 # This is ignored if value_render_option is
497 # FORMATTED_VALUE.
498 # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
499 "valueRenderOption": "A String", # How values should be represented in the output.
500 # The default render option is ValueRenderOption.FORMATTED_VALUE.
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 "dataFilters": [ # The data filters used to match the ranges of values to retrieve. Ranges
502 # that match any of the specified data filters are included in the response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 { # Filter that describes what data should be selected or returned from a
504 # request.
505 "developerMetadataLookup": { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
506 # described by this DeveloperMetadataLookup.
507 # example, if only a metadata ID is specified this considers the
508 # DeveloperMetadata with that particular unique ID. If a metadata key is
509 # specified, this considers all developer metadata with that key. If a
510 # key, visibility, and location type are all specified, this considers all
511 # developer metadata with that key and visibility that are associated with a
512 # location of that type. In general, this
513 # selects all DeveloperMetadata that matches the intersection of all the
514 # specified fields; any field or combination of fields may be specified.
515 "metadataLocation": { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
516 # the specified location. This field either matches exact locations or all
517 # intersecting locations according the specified
518 # locationMatchingStrategy.
519 "locationType": "A String", # The type of location this object represents. This field is read-only.
520 "dimensionRange": { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
521 # a dimension. The specified DimensionRange must represent a single row
522 # or column; it cannot be unbounded or span multiple rows or columns.
523 # All indexes are zero-based.
524 # Indexes are half open: the start index is inclusive
525 # and the end index is exclusive.
526 # Missing indexes indicate the range is unbounded on that side.
527 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
528 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
529 "sheetId": 42, # The sheet this span is on.
530 "dimension": "A String", # The dimension of the span.
531 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet.
Dan O'Mearadd494642020-05-01 07:42:23 -0700533 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 },
535 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching
536 # DeveloperMetadata.metadata_value.
537 "locationMatchingStrategy": "A String", # Determines how this lookup matches the location. If this field is
538 # specified as EXACT, only developer metadata associated on the exact
539 # location specified is matched. If this field is specified to INTERSECTING,
540 # developer metadata associated on intersecting locations is also
541 # matched. If left unspecified, this field assumes a default value of
542 # INTERSECTING.
543 # If this field is specified, a metadataLocation
544 # must also be specified.
545 "locationType": "A String", # Limits the selected developer metadata to those entries which are
546 # associated with locations of the specified type. For example, when this
547 # field is specified as ROW this lookup
548 # only considers developer metadata associated on rows. If the field is left
549 # unspecified, all location types are considered. This field cannot be
550 # specified as SPREADSHEET when
551 # the locationMatchingStrategy
552 # is specified as INTERSECTING or when the
553 # metadataLocation is specified as a
554 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
555 # developer metadata location. This field also must be left unspecified when
556 # the locationMatchingStrategy
557 # is specified as EXACT.
558 "metadataId": 42, # Limits the selected developer metadata to that which has a matching
559 # DeveloperMetadata.metadata_id.
560 "visibility": "A String", # Limits the selected developer metadata to that which has a matching
561 # DeveloperMetadata.visibility. If left unspecified, all developer
562 # metadata visibile to the requesting project is considered.
563 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching
564 # DeveloperMetadata.metadata_key.
565 },
566 "a1Range": "A String", # Selects data that matches the specified A1 range.
567 "gridRange": { # A range on a sheet. # Selects data that matches the range described by the GridRange.
568 # All indexes are zero-based.
569 # Indexes are half open, e.g the start index is inclusive
570 # and the end index is exclusive -- [start_index, end_index).
571 # Missing indexes indicate the range is unbounded on that side.
572 #
573 # For example, if `"Sheet1"` is sheet ID 0, then:
574 #
575 # `Sheet1!A1:A1 == sheet_id: 0,
576 # start_row_index: 0, end_row_index: 1,
577 # start_column_index: 0, end_column_index: 1`
578 #
579 # `Sheet1!A3:B4 == sheet_id: 0,
580 # start_row_index: 2, end_row_index: 4,
581 # start_column_index: 0, end_column_index: 2`
582 #
583 # `Sheet1!A:B == sheet_id: 0,
584 # start_column_index: 0, end_column_index: 2`
585 #
586 # `Sheet1!A5:B == sheet_id: 0,
587 # start_row_index: 4,
588 # start_column_index: 0, end_column_index: 2`
589 #
590 # `Sheet1 == sheet_id:0`
591 #
592 # The start index must always be less than or equal to the end index.
593 # If the start index equals the end index, then the range is empty.
594 # Empty ranges are typically not meaningful and are usually rendered in the
595 # UI as `#REF!`.
596 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
597 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
598 "sheetId": 42, # The sheet this range is on.
599 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
600 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
601 },
602 },
603 ],
604 "majorDimension": "A String", # The major dimension that results should use.
605 #
606 # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
Dan O'Mearadd494642020-05-01 07:42:23 -0700607 # then a request that selects that range and sets `majorDimension=ROWS`
608 # returns `[[1,2],[3,4]]`, whereas a request that sets
609 # `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 }
611
612 x__xgafv: string, V1 error format.
613 Allowed values
614 1 - v1 error format
615 2 - v2 error format
616
617Returns:
618 An object of the form:
619
620 { # The response when retrieving more than one range of values in a spreadsheet
621 # selected by DataFilters.
622 "spreadsheetId": "A String", # The ID of the spreadsheet the data was retrieved from.
623 "valueRanges": [ # The requested values with the list of data filters that matched them.
624 { # A value range that was matched by one or more data filers.
625 "valueRange": { # Data within a range of the spreadsheet. # The values matched by the DataFilter.
626 "range": "A String", # The range the values cover, in A1 notation.
627 # For output, this range indicates the entire requested range,
628 # even though the values will exclude trailing rows and columns.
629 # When appending values, this field represents the range to search for a
630 # table, after which values will be appended.
631 "values": [ # The data that was read or to be written. This is an array of arrays,
632 # the outer array representing all the data and each inner array
633 # representing a major dimension. Each item in the inner array
634 # corresponds with one cell.
635 #
636 # For output, empty trailing rows and columns will not be included.
637 #
638 # For input, supported value types are: bool, string, and double.
639 # Null values will be skipped.
640 # To set a cell to an empty value, set the string value to an empty string.
641 [
642 "",
643 ],
644 ],
645 "majorDimension": "A String", # The major dimension of the values.
646 #
647 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
648 # then requesting `range=A1:B2,majorDimension=ROWS` will return
649 # `[[1,2],[3,4]]`,
650 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
651 # `[[1,3],[2,4]]`.
652 #
653 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
654 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
655 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
656 #
657 # When writing, if this field is not set, it defaults to ROWS.
658 },
659 "dataFilters": [ # The DataFilters from the request that matched the range of
660 # values.
661 { # Filter that describes what data should be selected or returned from a
662 # request.
663 "developerMetadataLookup": { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
664 # described by this DeveloperMetadataLookup.
665 # example, if only a metadata ID is specified this considers the
666 # DeveloperMetadata with that particular unique ID. If a metadata key is
667 # specified, this considers all developer metadata with that key. If a
668 # key, visibility, and location type are all specified, this considers all
669 # developer metadata with that key and visibility that are associated with a
670 # location of that type. In general, this
671 # selects all DeveloperMetadata that matches the intersection of all the
672 # specified fields; any field or combination of fields may be specified.
673 "metadataLocation": { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
674 # the specified location. This field either matches exact locations or all
675 # intersecting locations according the specified
676 # locationMatchingStrategy.
677 "locationType": "A String", # The type of location this object represents. This field is read-only.
678 "dimensionRange": { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
679 # a dimension. The specified DimensionRange must represent a single row
680 # or column; it cannot be unbounded or span multiple rows or columns.
681 # All indexes are zero-based.
682 # Indexes are half open: the start index is inclusive
683 # and the end index is exclusive.
684 # Missing indexes indicate the range is unbounded on that side.
685 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
686 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
687 "sheetId": 42, # The sheet this span is on.
688 "dimension": "A String", # The dimension of the span.
689 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700690 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet.
Dan O'Mearadd494642020-05-01 07:42:23 -0700691 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 },
693 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching
694 # DeveloperMetadata.metadata_value.
695 "locationMatchingStrategy": "A String", # Determines how this lookup matches the location. If this field is
696 # specified as EXACT, only developer metadata associated on the exact
697 # location specified is matched. If this field is specified to INTERSECTING,
698 # developer metadata associated on intersecting locations is also
699 # matched. If left unspecified, this field assumes a default value of
700 # INTERSECTING.
701 # If this field is specified, a metadataLocation
702 # must also be specified.
703 "locationType": "A String", # Limits the selected developer metadata to those entries which are
704 # associated with locations of the specified type. For example, when this
705 # field is specified as ROW this lookup
706 # only considers developer metadata associated on rows. If the field is left
707 # unspecified, all location types are considered. This field cannot be
708 # specified as SPREADSHEET when
709 # the locationMatchingStrategy
710 # is specified as INTERSECTING or when the
711 # metadataLocation is specified as a
712 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
713 # developer metadata location. This field also must be left unspecified when
714 # the locationMatchingStrategy
715 # is specified as EXACT.
716 "metadataId": 42, # Limits the selected developer metadata to that which has a matching
717 # DeveloperMetadata.metadata_id.
718 "visibility": "A String", # Limits the selected developer metadata to that which has a matching
719 # DeveloperMetadata.visibility. If left unspecified, all developer
720 # metadata visibile to the requesting project is considered.
721 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching
722 # DeveloperMetadata.metadata_key.
723 },
724 "a1Range": "A String", # Selects data that matches the specified A1 range.
725 "gridRange": { # A range on a sheet. # Selects data that matches the range described by the GridRange.
726 # All indexes are zero-based.
727 # Indexes are half open, e.g the start index is inclusive
728 # and the end index is exclusive -- [start_index, end_index).
729 # Missing indexes indicate the range is unbounded on that side.
730 #
731 # For example, if `"Sheet1"` is sheet ID 0, then:
732 #
733 # `Sheet1!A1:A1 == sheet_id: 0,
734 # start_row_index: 0, end_row_index: 1,
735 # start_column_index: 0, end_column_index: 1`
736 #
737 # `Sheet1!A3:B4 == sheet_id: 0,
738 # start_row_index: 2, end_row_index: 4,
739 # start_column_index: 0, end_column_index: 2`
740 #
741 # `Sheet1!A:B == sheet_id: 0,
742 # start_column_index: 0, end_column_index: 2`
743 #
744 # `Sheet1!A5:B == sheet_id: 0,
745 # start_row_index: 4,
746 # start_column_index: 0, end_column_index: 2`
747 #
748 # `Sheet1 == sheet_id:0`
749 #
750 # The start index must always be less than or equal to the end index.
751 # If the start index equals the end index, then the range is empty.
752 # Empty ranges are typically not meaningful and are usually rendered in the
753 # UI as `#REF!`.
754 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
755 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
756 "sheetId": 42, # The sheet this range is on.
757 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
758 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
759 },
760 },
761 ],
762 },
763 ],
764 }</pre>
765</div>
766
767<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700768 <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700769 <pre>Sets values in one or more ranges of a spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700770The caller must specify the spreadsheet ID,
771a valueInputOption, and one or more
772ValueRanges.
773
774Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700775 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700777 The object takes the form of:
778
779{ # The request for updating more than one range of values in a spreadsheet.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700780 "valueInputOption": "A String", # How the input data should be interpreted.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700781 "data": [ # The new values to apply to the spreadsheet.
782 { # Data within a range of the spreadsheet.
783 "range": "A String", # The range the values cover, in A1 notation.
784 # For output, this range indicates the entire requested range,
785 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700786 # When appending values, this field represents the range to search for a
787 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700788 "values": [ # The data that was read or to be written. This is an array of arrays,
789 # the outer array representing all the data and each inner array
790 # representing a major dimension. Each item in the inner array
791 # corresponds with one cell.
792 #
793 # For output, empty trailing rows and columns will not be included.
794 #
795 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700796 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700797 # To set a cell to an empty value, set the string value to an empty string.
798 [
799 "",
800 ],
801 ],
802 "majorDimension": "A String", # The major dimension of the values.
803 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700804 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
805 # then requesting `range=A1:B2,majorDimension=ROWS` will return
806 # `[[1,2],[3,4]]`,
807 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
808 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700809 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700810 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
811 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
812 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700813 #
814 # When writing, if this field is not set, it defaults to ROWS.
815 },
816 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 "responseDateTimeRenderOption": "A String", # Determines how dates, times, and durations in the response should be
818 # rendered. This is ignored if response_value_render_option is
819 # FORMATTED_VALUE.
820 # The default dateTime render option is
821 # DateTimeRenderOption.SERIAL_NUMBER.
Dan O'Mearadd494642020-05-01 07:42:23 -0700822 "responseValueRenderOption": "A String", # Determines how values in the response should be rendered.
823 # The default render option is ValueRenderOption.FORMATTED_VALUE.
824 "includeValuesInResponse": True or False, # Determines if the update response should include the values
825 # of the cells that were updated. By default, responses
826 # do not include the updated values. The `updatedData` field within
827 # each of the BatchUpdateValuesResponse.responses contains the updated
828 # values. If the range to write was larger than the range actually written,
829 # the response includes all values in the requested range (excluding trailing
830 # empty rows and columns).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700831 }
832
833 x__xgafv: string, V1 error format.
834 Allowed values
835 1 - v1 error format
836 2 - v2 error format
837
838Returns:
839 An object of the form:
840
841 { # The response when updating a range of values in a spreadsheet.
842 "responses": [ # One UpdateValuesResponse per requested range, in the same order as
843 # the requests appeared.
844 { # The response when updating a range of values in a spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
Dan O'Mearadd494642020-05-01 07:42:23 -0700846 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700847 "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800848 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
849 # This is only included if the request's `includeValuesInResponse` field
850 # was `true`.
851 "range": "A String", # The range the values cover, in A1 notation.
852 # For output, this range indicates the entire requested range,
853 # even though the values will exclude trailing rows and columns.
854 # When appending values, this field represents the range to search for a
855 # table, after which values will be appended.
856 "values": [ # The data that was read or to be written. This is an array of arrays,
857 # the outer array representing all the data and each inner array
858 # representing a major dimension. Each item in the inner array
859 # corresponds with one cell.
860 #
861 # For output, empty trailing rows and columns will not be included.
862 #
863 # For input, supported value types are: bool, string, and double.
864 # Null values will be skipped.
865 # To set a cell to an empty value, set the string value to an empty string.
866 [
867 "",
868 ],
869 ],
870 "majorDimension": "A String", # The major dimension of the values.
871 #
872 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
873 # then requesting `range=A1:B2,majorDimension=ROWS` will return
874 # `[[1,2],[3,4]]`,
875 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
876 # `[[1,3],[2,4]]`.
877 #
878 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
879 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
880 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
881 #
882 # When writing, if this field is not set, it defaults to ROWS.
883 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700884 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800885 "updatedCells": 42, # The number of cells updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700886 },
887 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700888 "totalUpdatedColumns": 42, # The total number of columns where at least one cell in the column was
889 # updated.
Thomas Coffee2f245372017-03-27 10:39:26 -0700890 "totalUpdatedCells": 42, # The total number of cells updated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Dan O'Mearadd494642020-05-01 07:42:23 -0700892 "totalUpdatedRows": 42, # The total number of rows where at least one cell in the row was updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700893 "totalUpdatedSheets": 42, # The total number of sheets where at least one cell in the sheet was
894 # updated.
895 }</pre>
896</div>
897
898<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 <code class="details" id="batchUpdateByDataFilter">batchUpdateByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 <pre>Sets values in one or more ranges of a spreadsheet.
901The caller must specify the spreadsheet ID,
902a valueInputOption, and one or more
903DataFilterValueRanges.
904
905Args:
906 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700907 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700908 The object takes the form of:
909
910{ # The request for updating more than one range of values in a spreadsheet.
Dan O'Mearadd494642020-05-01 07:42:23 -0700911 "responseValueRenderOption": "A String", # Determines how values in the response should be rendered.
912 # The default render option is ValueRenderOption.FORMATTED_VALUE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700913 "data": [ # The new values to apply to the spreadsheet. If more than one range is
Dan O'Mearadd494642020-05-01 07:42:23 -0700914 # matched by the specified DataFilter the specified values are applied to
915 # all of those ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 { # A range of values whose location is specified by a DataFilter.
917 "values": [ # The data to be written. If the provided values exceed any of the ranges
Dan O'Mearadd494642020-05-01 07:42:23 -0700918 # matched by the data filter then the request fails. If the provided values
919 # are less than the matched ranges only the specified values are written,
920 # existing values in the matched ranges remain unaffected.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700921 [
922 "",
923 ],
924 ],
925 "dataFilter": { # Filter that describes what data should be selected or returned from a # The data filter describing the location of the values in the spreadsheet.
926 # request.
927 "developerMetadataLookup": { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
928 # described by this DeveloperMetadataLookup.
929 # example, if only a metadata ID is specified this considers the
930 # DeveloperMetadata with that particular unique ID. If a metadata key is
931 # specified, this considers all developer metadata with that key. If a
932 # key, visibility, and location type are all specified, this considers all
933 # developer metadata with that key and visibility that are associated with a
934 # location of that type. In general, this
935 # selects all DeveloperMetadata that matches the intersection of all the
936 # specified fields; any field or combination of fields may be specified.
937 "metadataLocation": { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
938 # the specified location. This field either matches exact locations or all
939 # intersecting locations according the specified
940 # locationMatchingStrategy.
941 "locationType": "A String", # The type of location this object represents. This field is read-only.
942 "dimensionRange": { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
943 # a dimension. The specified DimensionRange must represent a single row
944 # or column; it cannot be unbounded or span multiple rows or columns.
945 # All indexes are zero-based.
946 # Indexes are half open: the start index is inclusive
947 # and the end index is exclusive.
948 # Missing indexes indicate the range is unbounded on that side.
949 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
950 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
951 "sheetId": 42, # The sheet this span is on.
952 "dimension": "A String", # The dimension of the span.
953 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700954 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet.
Dan O'Mearadd494642020-05-01 07:42:23 -0700955 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700956 },
957 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching
958 # DeveloperMetadata.metadata_value.
959 "locationMatchingStrategy": "A String", # Determines how this lookup matches the location. If this field is
960 # specified as EXACT, only developer metadata associated on the exact
961 # location specified is matched. If this field is specified to INTERSECTING,
962 # developer metadata associated on intersecting locations is also
963 # matched. If left unspecified, this field assumes a default value of
964 # INTERSECTING.
965 # If this field is specified, a metadataLocation
966 # must also be specified.
967 "locationType": "A String", # Limits the selected developer metadata to those entries which are
968 # associated with locations of the specified type. For example, when this
969 # field is specified as ROW this lookup
970 # only considers developer metadata associated on rows. If the field is left
971 # unspecified, all location types are considered. This field cannot be
972 # specified as SPREADSHEET when
973 # the locationMatchingStrategy
974 # is specified as INTERSECTING or when the
975 # metadataLocation is specified as a
976 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
977 # developer metadata location. This field also must be left unspecified when
978 # the locationMatchingStrategy
979 # is specified as EXACT.
980 "metadataId": 42, # Limits the selected developer metadata to that which has a matching
981 # DeveloperMetadata.metadata_id.
982 "visibility": "A String", # Limits the selected developer metadata to that which has a matching
983 # DeveloperMetadata.visibility. If left unspecified, all developer
984 # metadata visibile to the requesting project is considered.
985 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching
986 # DeveloperMetadata.metadata_key.
987 },
988 "a1Range": "A String", # Selects data that matches the specified A1 range.
989 "gridRange": { # A range on a sheet. # Selects data that matches the range described by the GridRange.
990 # All indexes are zero-based.
991 # Indexes are half open, e.g the start index is inclusive
992 # and the end index is exclusive -- [start_index, end_index).
993 # Missing indexes indicate the range is unbounded on that side.
994 #
995 # For example, if `"Sheet1"` is sheet ID 0, then:
996 #
997 # `Sheet1!A1:A1 == sheet_id: 0,
998 # start_row_index: 0, end_row_index: 1,
999 # start_column_index: 0, end_column_index: 1`
1000 #
1001 # `Sheet1!A3:B4 == sheet_id: 0,
1002 # start_row_index: 2, end_row_index: 4,
1003 # start_column_index: 0, end_column_index: 2`
1004 #
1005 # `Sheet1!A:B == sheet_id: 0,
1006 # start_column_index: 0, end_column_index: 2`
1007 #
1008 # `Sheet1!A5:B == sheet_id: 0,
1009 # start_row_index: 4,
1010 # start_column_index: 0, end_column_index: 2`
1011 #
1012 # `Sheet1 == sheet_id:0`
1013 #
1014 # The start index must always be less than or equal to the end index.
1015 # If the start index equals the end index, then the range is empty.
1016 # Empty ranges are typically not meaningful and are usually rendered in the
1017 # UI as `#REF!`.
1018 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1019 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1020 "sheetId": 42, # The sheet this range is on.
1021 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1022 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1023 },
1024 },
1025 "majorDimension": "A String", # The major dimension of the values.
1026 },
1027 ],
1028 "includeValuesInResponse": True or False, # Determines if the update response should include the values
1029 # of the cells that were updated. By default, responses
1030 # do not include the updated values. The `updatedData` field within
Dan O'Mearadd494642020-05-01 07:42:23 -07001031 # each of the BatchUpdateValuesResponse.responses contains the updated
1032 # values. If the range to write was larger than the range actually written,
1033 # the response includes all values in the requested range (excluding trailing
1034 # empty rows and columns).
1035 "valueInputOption": "A String", # How the input data should be interpreted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 "responseDateTimeRenderOption": "A String", # Determines how dates, times, and durations in the response should be
1037 # rendered. This is ignored if response_value_render_option is
1038 # FORMATTED_VALUE.
1039 # The default dateTime render option is
1040 # DateTimeRenderOption.SERIAL_NUMBER.
1041 }
1042
1043 x__xgafv: string, V1 error format.
1044 Allowed values
1045 1 - v1 error format
1046 2 - v2 error format
1047
1048Returns:
1049 An object of the form:
1050
1051 { # The response when updating a range of values in a spreadsheet.
1052 "responses": [ # The response for each range updated.
1053 { # The response when updating a range of values by a data filter in a
1054 # spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001055 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001056 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001057 "dataFilter": { # Filter that describes what data should be selected or returned from a # The data filter that selected the range that was updated.
1058 # request.
1059 "developerMetadataLookup": { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
1060 # described by this DeveloperMetadataLookup.
1061 # example, if only a metadata ID is specified this considers the
1062 # DeveloperMetadata with that particular unique ID. If a metadata key is
1063 # specified, this considers all developer metadata with that key. If a
1064 # key, visibility, and location type are all specified, this considers all
1065 # developer metadata with that key and visibility that are associated with a
1066 # location of that type. In general, this
1067 # selects all DeveloperMetadata that matches the intersection of all the
1068 # specified fields; any field or combination of fields may be specified.
1069 "metadataLocation": { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
1070 # the specified location. This field either matches exact locations or all
1071 # intersecting locations according the specified
1072 # locationMatchingStrategy.
1073 "locationType": "A String", # The type of location this object represents. This field is read-only.
1074 "dimensionRange": { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
1075 # a dimension. The specified DimensionRange must represent a single row
1076 # or column; it cannot be unbounded or span multiple rows or columns.
1077 # All indexes are zero-based.
1078 # Indexes are half open: the start index is inclusive
1079 # and the end index is exclusive.
1080 # Missing indexes indicate the range is unbounded on that side.
1081 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
1082 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
1083 "sheetId": 42, # The sheet this span is on.
1084 "dimension": "A String", # The dimension of the span.
1085 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet.
Dan O'Mearadd494642020-05-01 07:42:23 -07001087 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001088 },
1089 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching
1090 # DeveloperMetadata.metadata_value.
1091 "locationMatchingStrategy": "A String", # Determines how this lookup matches the location. If this field is
1092 # specified as EXACT, only developer metadata associated on the exact
1093 # location specified is matched. If this field is specified to INTERSECTING,
1094 # developer metadata associated on intersecting locations is also
1095 # matched. If left unspecified, this field assumes a default value of
1096 # INTERSECTING.
1097 # If this field is specified, a metadataLocation
1098 # must also be specified.
1099 "locationType": "A String", # Limits the selected developer metadata to those entries which are
1100 # associated with locations of the specified type. For example, when this
1101 # field is specified as ROW this lookup
1102 # only considers developer metadata associated on rows. If the field is left
1103 # unspecified, all location types are considered. This field cannot be
1104 # specified as SPREADSHEET when
1105 # the locationMatchingStrategy
1106 # is specified as INTERSECTING or when the
1107 # metadataLocation is specified as a
1108 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
1109 # developer metadata location. This field also must be left unspecified when
1110 # the locationMatchingStrategy
1111 # is specified as EXACT.
1112 "metadataId": 42, # Limits the selected developer metadata to that which has a matching
1113 # DeveloperMetadata.metadata_id.
1114 "visibility": "A String", # Limits the selected developer metadata to that which has a matching
1115 # DeveloperMetadata.visibility. If left unspecified, all developer
1116 # metadata visibile to the requesting project is considered.
1117 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching
1118 # DeveloperMetadata.metadata_key.
1119 },
1120 "a1Range": "A String", # Selects data that matches the specified A1 range.
1121 "gridRange": { # A range on a sheet. # Selects data that matches the range described by the GridRange.
1122 # All indexes are zero-based.
1123 # Indexes are half open, e.g the start index is inclusive
1124 # and the end index is exclusive -- [start_index, end_index).
1125 # Missing indexes indicate the range is unbounded on that side.
1126 #
1127 # For example, if `"Sheet1"` is sheet ID 0, then:
1128 #
1129 # `Sheet1!A1:A1 == sheet_id: 0,
1130 # start_row_index: 0, end_row_index: 1,
1131 # start_column_index: 0, end_column_index: 1`
1132 #
1133 # `Sheet1!A3:B4 == sheet_id: 0,
1134 # start_row_index: 2, end_row_index: 4,
1135 # start_column_index: 0, end_column_index: 2`
1136 #
1137 # `Sheet1!A:B == sheet_id: 0,
1138 # start_column_index: 0, end_column_index: 2`
1139 #
1140 # `Sheet1!A5:B == sheet_id: 0,
1141 # start_row_index: 4,
1142 # start_column_index: 0, end_column_index: 2`
1143 #
1144 # `Sheet1 == sheet_id:0`
1145 #
1146 # The start index must always be less than or equal to the end index.
1147 # If the start index equals the end index, then the range is empty.
1148 # Empty ranges are typically not meaningful and are usually rendered in the
1149 # UI as `#REF!`.
1150 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
1151 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
1152 "sheetId": 42, # The sheet this range is on.
1153 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
1154 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
1155 },
1156 },
1157 "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
1158 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells in the range matched by the dataFilter after all
1159 # updates were applied. This is only included if the request's
1160 # `includeValuesInResponse` field was `true`.
1161 "range": "A String", # The range the values cover, in A1 notation.
1162 # For output, this range indicates the entire requested range,
1163 # even though the values will exclude trailing rows and columns.
1164 # When appending values, this field represents the range to search for a
1165 # table, after which values will be appended.
1166 "values": [ # The data that was read or to be written. This is an array of arrays,
1167 # the outer array representing all the data and each inner array
1168 # representing a major dimension. Each item in the inner array
1169 # corresponds with one cell.
1170 #
1171 # For output, empty trailing rows and columns will not be included.
1172 #
1173 # For input, supported value types are: bool, string, and double.
1174 # Null values will be skipped.
1175 # To set a cell to an empty value, set the string value to an empty string.
1176 [
1177 "",
1178 ],
1179 ],
1180 "majorDimension": "A String", # The major dimension of the values.
1181 #
1182 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1183 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1184 # `[[1,2],[3,4]]`,
1185 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1186 # `[[1,3],[2,4]]`.
1187 #
1188 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1189 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1190 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
1191 #
1192 # When writing, if this field is not set, it defaults to ROWS.
1193 },
1194 "updatedCells": 42, # The number of cells updated.
1195 },
1196 ],
1197 "totalUpdatedColumns": 42, # The total number of columns where at least one cell in the column was
1198 # updated.
1199 "totalUpdatedCells": 42, # The total number of cells updated.
1200 "totalUpdatedRows": 42, # The total number of rows where at least one cell in the row was updated.
1201 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
1202 "totalUpdatedSheets": 42, # The total number of sheets where at least one cell in the sheet was
1203 # updated.
1204 }</pre>
1205</div>
1206
1207<div class="method">
1208 <code class="details" id="clear">clear(spreadsheetId, range, body=None, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001209 <pre>Clears values from a spreadsheet.
1210The caller must specify the spreadsheet ID and range.
1211Only values are cleared -- all other properties of the cell (such as
1212formatting, data validation, etc..) are kept.
1213
1214Args:
1215 spreadsheetId: string, The ID of the spreadsheet to update. (required)
1216 range: string, The A1 notation of the values to clear. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001217 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001218 The object takes the form of:
1219
1220{ # The request for clearing a range of values in a spreadsheet.
1221 }
1222
1223 x__xgafv: string, V1 error format.
1224 Allowed values
1225 1 - v1 error format
1226 2 - v2 error format
1227
1228Returns:
1229 An object of the form:
1230
1231 { # The response when clearing a range of values in a spreadsheet.
1232 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
1233 "clearedRange": "A String", # The range (in A1 notation) that was cleared.
1234 # (If the request was for an unbounded range or a ranger larger
1235 # than the bounds of the sheet, this will be the actual range
1236 # that was cleared, bounded to the sheet's limits.)
1237 }</pre>
1238</div>
1239
1240<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001241 <code class="details" id="get">get(spreadsheetId, range, valueRenderOption=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001242 <pre>Returns a range of values from a spreadsheet.
1243The caller must specify the spreadsheet ID and a range.
1244
1245Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001246 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001247 range: string, The A1 notation of the values to retrieve. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001248 valueRenderOption: string, How values should be represented in the output.
1249The default render option is ValueRenderOption.FORMATTED_VALUE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001250 majorDimension: string, The major dimension that results should use.
1251
Dan O'Mearadd494642020-05-01 07:42:23 -07001252For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then
1253requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`,
1254whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001255`[[1,3],[2,4]]`.
1256 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001257This is ignored if value_render_option is
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001258FORMATTED_VALUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001259The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001260 x__xgafv: string, V1 error format.
1261 Allowed values
1262 1 - v1 error format
1263 2 - v2 error format
1264
1265Returns:
1266 An object of the form:
1267
1268 { # Data within a range of the spreadsheet.
1269 "range": "A String", # The range the values cover, in A1 notation.
1270 # For output, this range indicates the entire requested range,
1271 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001272 # When appending values, this field represents the range to search for a
1273 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001274 "values": [ # The data that was read or to be written. This is an array of arrays,
1275 # the outer array representing all the data and each inner array
1276 # representing a major dimension. Each item in the inner array
1277 # corresponds with one cell.
1278 #
1279 # For output, empty trailing rows and columns will not be included.
1280 #
1281 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001282 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001283 # To set a cell to an empty value, set the string value to an empty string.
1284 [
1285 "",
1286 ],
1287 ],
1288 "majorDimension": "A String", # The major dimension of the values.
1289 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001290 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1291 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1292 # `[[1,2],[3,4]]`,
1293 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1294 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001295 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001296 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1297 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1298 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001299 #
1300 # When writing, if this field is not set, it defaults to ROWS.
1301 }</pre>
1302</div>
1303
1304<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001305 <code class="details" id="update">update(spreadsheetId, range, body=None, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001306 <pre>Sets values in a range of a spreadsheet.
1307The caller must specify the spreadsheet ID, range, and
1308a valueInputOption.
1309
1310Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001311 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001312 range: string, The A1 notation of the values to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001313 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001314 The object takes the form of:
1315
1316{ # Data within a range of the spreadsheet.
1317 "range": "A String", # The range the values cover, in A1 notation.
1318 # For output, this range indicates the entire requested range,
1319 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001320 # When appending values, this field represents the range to search for a
1321 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001322 "values": [ # The data that was read or to be written. This is an array of arrays,
1323 # the outer array representing all the data and each inner array
1324 # representing a major dimension. Each item in the inner array
1325 # corresponds with one cell.
1326 #
1327 # For output, empty trailing rows and columns will not be included.
1328 #
1329 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001330 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001331 # To set a cell to an empty value, set the string value to an empty string.
1332 [
1333 "",
1334 ],
1335 ],
1336 "majorDimension": "A String", # The major dimension of the values.
1337 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001338 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1339 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1340 # `[[1,2],[3,4]]`,
1341 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1342 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001343 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001344 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1345 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1346 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001347 #
1348 # When writing, if this field is not set, it defaults to ROWS.
1349}
1350
1351 valueInputOption: string, How the input data should be interpreted.
1352 x__xgafv: string, V1 error format.
1353 Allowed values
1354 1 - v1 error format
1355 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001356 responseValueRenderOption: string, Determines how values in the response should be rendered.
1357The default render option is ValueRenderOption.FORMATTED_VALUE.
1358 includeValuesInResponse: boolean, Determines if the update response should include the values
1359of the cells that were updated. By default, responses
1360do not include the updated values.
Dan O'Mearadd494642020-05-01 07:42:23 -07001361If the range to write was larger than the range actually written, the
1362response includes all values in the requested range (excluding trailing
1363empty rows and columns).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001364 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be
1365rendered. This is ignored if response_value_render_option is
1366FORMATTED_VALUE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001367The default dateTime render option is
1368DateTimeRenderOption.SERIAL_NUMBER.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001369
1370Returns:
1371 An object of the form:
1372
1373 { # The response when updating a range of values in a spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001374 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
Dan O'Mearadd494642020-05-01 07:42:23 -07001375 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001376 "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001377 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
1378 # This is only included if the request's `includeValuesInResponse` field
1379 # was `true`.
1380 "range": "A String", # The range the values cover, in A1 notation.
1381 # For output, this range indicates the entire requested range,
1382 # even though the values will exclude trailing rows and columns.
1383 # When appending values, this field represents the range to search for a
1384 # table, after which values will be appended.
1385 "values": [ # The data that was read or to be written. This is an array of arrays,
1386 # the outer array representing all the data and each inner array
1387 # representing a major dimension. Each item in the inner array
1388 # corresponds with one cell.
1389 #
1390 # For output, empty trailing rows and columns will not be included.
1391 #
1392 # For input, supported value types are: bool, string, and double.
1393 # Null values will be skipped.
1394 # To set a cell to an empty value, set the string value to an empty string.
1395 [
1396 "",
1397 ],
1398 ],
1399 "majorDimension": "A String", # The major dimension of the values.
1400 #
1401 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1402 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1403 # `[[1,2],[3,4]]`,
1404 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1405 # `[[1,3],[2,4]]`.
1406 #
1407 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1408 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1409 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
1410 #
1411 # When writing, if this field is not set, it defaults to ROWS.
1412 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001413 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001414 "updatedCells": 42, # The number of cells updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001415 }</pre>
1416</div>
1417
1418</body></html>