blob: 8adc6a01b24636650e791da480e82aa5bdabe475 [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#append">append(spreadsheetId, range, body=None, responseValueRenderOption=None, responseDateTimeRenderOption=None, valueInputOption=None, includeValuesInResponse=None, insertDataOption=None, x__xgafv=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">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#batchGet">batchGet(spreadsheetId, ranges=None, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=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 Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#get">get(spreadsheetId, range, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=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">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code><a href="#update">update(spreadsheetId, range, body=None, responseDateTimeRenderOption=None, valueInputOption=None, includeValuesInResponse=None, responseValueRenderOption=None, x__xgafv=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">
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 <code class="details" id="append">append(spreadsheetId, range, body=None, responseValueRenderOption=None, responseDateTimeRenderOption=None, valueInputOption=None, includeValuesInResponse=None, insertDataOption=None, x__xgafv=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
Bu Sun Kim65020912020-05-20 12:08:20 -0700111existing data and find a &quot;table&quot; within that range. Values will be
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700112appended 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700134 # the outer array representing all the data and each inner array
135 # representing a major dimension. Each item in the inner array
136 # corresponds with one cell.
137 #
138 # For output, empty trailing rows and columns will not be included.
139 #
140 # For input, supported value types are: bool, string, and double.
141 # Null values will be skipped.
142 # To set a cell to an empty value, set the string value to an empty string.
143 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;&quot;,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700145 ],
146 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
148 # For output, this range indicates the entire requested range,
149 # even though the values will exclude trailing rows and columns.
150 # When appending values, this field represents the range to search for a
151 # table, after which values will be appended.
152 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700153 #
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 Parrott692617a2017-01-06 09:58:29 -0800167 responseValueRenderOption: string, Determines how values in the response should be rendered.
168The default render option is ValueRenderOption.FORMATTED_VALUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800169 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be
170rendered. This is ignored if response_value_render_option is
171FORMATTED_VALUE.
172The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 valueInputOption: string, How the input data should be interpreted.
174 includeValuesInResponse: boolean, Determines if the update response should include the values
175of the cells that were appended. By default, responses
176do not include the updated values.
177 insertDataOption: string, How the input data should be inserted.
178 x__xgafv: string, V1 error format.
179 Allowed values
180 1 - v1 error format
181 2 - v2 error format
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 &quot;tableRange&quot;: &quot;A String&quot;, # The range (in A1 notation) of the table that values are being appended to
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700188 # (before the values were appended).
189 # Empty if no table was found.
Bu Sun Kim65020912020-05-20 12:08:20 -0700190 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
191 &quot;updates&quot;: { # The response when updating a range of values in a spreadsheet. # Information about the updates that were applied.
192 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
193 # This is only included if the request&#x27;s `includeValuesInResponse` field
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800194 # was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800196 # the outer array representing all the data and each inner array
197 # representing a major dimension. Each item in the inner array
198 # corresponds with one cell.
199 #
200 # For output, empty trailing rows and columns will not be included.
201 #
202 # For input, supported value types are: bool, string, and double.
203 # Null values will be skipped.
204 # To set a cell to an empty value, set the string value to an empty string.
205 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800207 ],
208 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
210 # For output, this range indicates the entire requested range,
211 # even though the values will exclude trailing rows and columns.
212 # When appending values, this field represents the range to search for a
213 # table, after which values will be appended.
214 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800215 #
216 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
217 # then requesting `range=A1:B2,majorDimension=ROWS` will return
218 # `[[1,2],[3,4]]`,
219 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
220 # `[[1,3],[2,4]]`.
221 #
222 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
223 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
224 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
225 #
226 # When writing, if this field is not set, it defaults to ROWS.
227 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
229 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
230 &quot;updatedCells&quot;: 42, # The number of cells updated.
231 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
232 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;ranges&quot;: [ # The ranges to clear, in A1 notation.
251 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700252 ],
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
265 &quot;clearedRanges&quot;: [ # The ranges that were cleared, in A1 notation. If the requests are for an
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 # unbounded range or a ranger larger than the bounds of the sheet, this is
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 # the actual ranges that were cleared, bounded to the sheet&#x27;s limits.
268 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700269 ],
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 &quot;dataFilters&quot;: [ # The DataFilters used to determine which ranges to clear.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 { # Filter that describes what data should be selected or returned from a
290 # request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;gridRange&quot;: { # A range on a sheet. # Selects data that matches the range described by the GridRange.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # All indexes are zero-based.
293 # Indexes are half open, e.g the start index is inclusive
294 # and the end index is exclusive -- [start_index, end_index).
295 # Missing indexes indicate the range is unbounded on that side.
296 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700297 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 #
299 # `Sheet1!A1:A1 == sheet_id: 0,
300 # start_row_index: 0, end_row_index: 1,
301 # start_column_index: 0, end_column_index: 1`
302 #
303 # `Sheet1!A3:B4 == sheet_id: 0,
304 # start_row_index: 2, end_row_index: 4,
305 # start_column_index: 0, end_column_index: 2`
306 #
307 # `Sheet1!A:B == sheet_id: 0,
308 # start_column_index: 0, end_column_index: 2`
309 #
310 # `Sheet1!A5:B == sheet_id: 0,
311 # start_row_index: 4,
312 # start_column_index: 0, end_column_index: 2`
313 #
314 # `Sheet1 == sheet_id:0`
315 #
316 # The start index must always be less than or equal to the end index.
317 # If the start index equals the end index, then the range is empty.
318 # Empty ranges are typically not meaningful and are usually rendered in the
319 # UI as `#REF!`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700320 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
321 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
322 &quot;sheetId&quot;: 42, # The sheet this range is on.
323 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
324 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
327 # described by this DeveloperMetadataLookup.
328 # example, if only a metadata ID is specified this considers the
329 # DeveloperMetadata with that particular unique ID. If a metadata key is
330 # specified, this considers all developer metadata with that key. If a
331 # key, visibility, and location type are all specified, this considers all
332 # developer metadata with that key and visibility that are associated with a
333 # location of that type. In general, this
334 # selects all DeveloperMetadata that matches the intersection of all the
335 # specified fields; any field or combination of fields may be specified.
336 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
337 # the specified location. This field either matches exact locations or all
338 # intersecting locations according the specified
339 # locationMatchingStrategy.
340 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
341 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
342 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
343 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
344 # a dimension. The specified DimensionRange must represent a single row
345 # or column; it cannot be unbounded or span multiple rows or columns.
346 # All indexes are zero-based.
347 # Indexes are half open: the start index is inclusive
348 # and the end index is exclusive.
349 # Missing indexes indicate the range is unbounded on that side.
350 &quot;sheetId&quot;: 42, # The sheet this span is on.
351 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
352 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
353 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
354 },
355 },
356 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
357 # DeveloperMetadata.metadata_id.
358 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
359 # DeveloperMetadata.visibility. If left unspecified, all developer
360 # metadata visibile to the requesting project is considered.
361 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
362 # DeveloperMetadata.metadata_value.
363 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
364 # associated with locations of the specified type. For example, when this
365 # field is specified as ROW this lookup
366 # only considers developer metadata associated on rows. If the field is left
367 # unspecified, all location types are considered. This field cannot be
368 # specified as SPREADSHEET when
369 # the locationMatchingStrategy
370 # is specified as INTERSECTING or when the
371 # metadataLocation is specified as a
372 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
373 # developer metadata location. This field also must be left unspecified when
374 # the locationMatchingStrategy
375 # is specified as EXACT.
376 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
377 # specified as EXACT, only developer metadata associated on the exact
378 # location specified is matched. If this field is specified to INTERSECTING,
379 # developer metadata associated on intersecting locations is also
380 # matched. If left unspecified, this field assumes a default value of
381 # INTERSECTING.
382 # If this field is specified, a metadataLocation
383 # must also be specified.
384 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
385 # DeveloperMetadata.metadata_key.
386 },
387 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 },
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
403 &quot;clearedRanges&quot;: [ # The ranges that were cleared, in A1 notation. If the requests are for an
Dan O'Mearadd494642020-05-01 07:42:23 -0700404 # unbounded range or a ranger larger than the bounds of the sheet, this is
Bu Sun Kim65020912020-05-20 12:08:20 -0700405 # the actual ranges that were cleared, bounded to the sheet&#x27;s limits.
406 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407 ],
408 }</pre>
409</div>
410
411<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 <code class="details" id="batchGet">batchGet(spreadsheetId, ranges=None, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700418 ranges: string, The A1 notation of the values to retrieve. (repeated)
Bu Sun Kim65020912020-05-20 12:08:20 -0700419 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
420This is ignored if value_render_option is
421FORMATTED_VALUE.
422The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700423 majorDimension: string, The major dimension that results should use.
424
425For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
Dan O'Mearadd494642020-05-01 07:42:23 -0700426then requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`,
427whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700428`[[1,3],[2,4]]`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700429 valueRenderOption: string, How values should be represented in the output.
430The default render option is ValueRenderOption.FORMATTED_VALUE.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The ID of the spreadsheet the data was retrieved from.
441 &quot;valueRanges&quot;: [ # The requested values. The order of the ValueRanges is the same as the
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700442 # order of the requested ranges.
443 { # Data within a range of the spreadsheet.
Bu Sun Kim65020912020-05-20 12:08:20 -0700444 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700445 # the outer array representing all the data and each inner array
446 # representing a major dimension. Each item in the inner array
447 # corresponds with one cell.
448 #
449 # For output, empty trailing rows and columns will not be included.
450 #
451 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700452 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700453 # To set a cell to an empty value, set the string value to an empty string.
454 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 &quot;&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700456 ],
457 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
459 # For output, this range indicates the entire requested range,
460 # even though the values will exclude trailing rows and columns.
461 # When appending values, this field represents the range to search for a
462 # table, after which values will be appended.
463 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700464 #
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 &quot;dateTimeRenderOption&quot;: &quot;A String&quot;, # How dates, times, and durations should be represented in the output.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 # This is ignored if value_render_option is
497 # FORMATTED_VALUE.
498 # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension that results should use.
500 #
501 # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
502 # then a request that selects that range and sets `majorDimension=ROWS`
503 # returns `[[1,2],[3,4]]`, whereas a request that sets
504 # `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
505 &quot;valueRenderOption&quot;: &quot;A String&quot;, # How values should be represented in the output.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700506 # The default render option is ValueRenderOption.FORMATTED_VALUE.
Bu Sun Kim65020912020-05-20 12:08:20 -0700507 &quot;dataFilters&quot;: [ # The data filters used to match the ranges of values to retrieve. Ranges
Dan O'Mearadd494642020-05-01 07:42:23 -0700508 # that match any of the specified data filters are included in the response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 { # Filter that describes what data should be selected or returned from a
510 # request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 &quot;gridRange&quot;: { # A range on a sheet. # Selects data that matches the range described by the GridRange.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700512 # All indexes are zero-based.
513 # Indexes are half open, e.g the start index is inclusive
514 # and the end index is exclusive -- [start_index, end_index).
515 # Missing indexes indicate the range is unbounded on that side.
516 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700517 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 #
519 # `Sheet1!A1:A1 == sheet_id: 0,
520 # start_row_index: 0, end_row_index: 1,
521 # start_column_index: 0, end_column_index: 1`
522 #
523 # `Sheet1!A3:B4 == sheet_id: 0,
524 # start_row_index: 2, end_row_index: 4,
525 # start_column_index: 0, end_column_index: 2`
526 #
527 # `Sheet1!A:B == sheet_id: 0,
528 # start_column_index: 0, end_column_index: 2`
529 #
530 # `Sheet1!A5:B == sheet_id: 0,
531 # start_row_index: 4,
532 # start_column_index: 0, end_column_index: 2`
533 #
534 # `Sheet1 == sheet_id:0`
535 #
536 # The start index must always be less than or equal to the end index.
537 # If the start index equals the end index, then the range is empty.
538 # Empty ranges are typically not meaningful and are usually rendered in the
539 # UI as `#REF!`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
541 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
542 &quot;sheetId&quot;: 42, # The sheet this range is on.
543 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
544 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
547 # described by this DeveloperMetadataLookup.
548 # example, if only a metadata ID is specified this considers the
549 # DeveloperMetadata with that particular unique ID. If a metadata key is
550 # specified, this considers all developer metadata with that key. If a
551 # key, visibility, and location type are all specified, this considers all
552 # developer metadata with that key and visibility that are associated with a
553 # location of that type. In general, this
554 # selects all DeveloperMetadata that matches the intersection of all the
555 # specified fields; any field or combination of fields may be specified.
556 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
557 # the specified location. This field either matches exact locations or all
558 # intersecting locations according the specified
559 # locationMatchingStrategy.
560 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
561 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
562 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
563 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
564 # a dimension. The specified DimensionRange must represent a single row
565 # or column; it cannot be unbounded or span multiple rows or columns.
566 # All indexes are zero-based.
567 # Indexes are half open: the start index is inclusive
568 # and the end index is exclusive.
569 # Missing indexes indicate the range is unbounded on that side.
570 &quot;sheetId&quot;: 42, # The sheet this span is on.
571 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
572 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
573 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
574 },
575 },
576 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
577 # DeveloperMetadata.metadata_id.
578 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
579 # DeveloperMetadata.visibility. If left unspecified, all developer
580 # metadata visibile to the requesting project is considered.
581 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
582 # DeveloperMetadata.metadata_value.
583 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
584 # associated with locations of the specified type. For example, when this
585 # field is specified as ROW this lookup
586 # only considers developer metadata associated on rows. If the field is left
587 # unspecified, all location types are considered. This field cannot be
588 # specified as SPREADSHEET when
589 # the locationMatchingStrategy
590 # is specified as INTERSECTING or when the
591 # metadataLocation is specified as a
592 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
593 # developer metadata location. This field also must be left unspecified when
594 # the locationMatchingStrategy
595 # is specified as EXACT.
596 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
597 # specified as EXACT, only developer metadata associated on the exact
598 # location specified is matched. If this field is specified to INTERSECTING,
599 # developer metadata associated on intersecting locations is also
600 # matched. If left unspecified, this field assumes a default value of
601 # INTERSECTING.
602 # If this field is specified, a metadataLocation
603 # must also be specified.
604 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
605 # DeveloperMetadata.metadata_key.
606 },
607 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 },
609 ],
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The ID of the spreadsheet the data was retrieved from.
623 &quot;valueRanges&quot;: [ # The requested values with the list of data filters that matched them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 { # A value range that was matched by one or more data filers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 &quot;valueRange&quot;: { # Data within a range of the spreadsheet. # The values matched by the DataFilter.
626 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627 # the outer array representing all the data and each inner array
628 # representing a major dimension. Each item in the inner array
629 # corresponds with one cell.
630 #
631 # For output, empty trailing rows and columns will not be included.
632 #
633 # For input, supported value types are: bool, string, and double.
634 # Null values will be skipped.
635 # To set a cell to an empty value, set the string value to an empty string.
636 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700637 &quot;&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 ],
639 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
641 # For output, this range indicates the entire requested range,
642 # even though the values will exclude trailing rows and columns.
643 # When appending values, this field represents the range to search for a
644 # table, after which values will be appended.
645 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700646 #
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 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;dataFilters&quot;: [ # The DataFilters from the request that matched the range of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700660 # values.
661 { # Filter that describes what data should be selected or returned from a
662 # request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;gridRange&quot;: { # A range on a sheet. # Selects data that matches the range described by the GridRange.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 # All indexes are zero-based.
665 # Indexes are half open, e.g the start index is inclusive
666 # and the end index is exclusive -- [start_index, end_index).
667 # Missing indexes indicate the range is unbounded on that side.
668 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 #
671 # `Sheet1!A1:A1 == sheet_id: 0,
672 # start_row_index: 0, end_row_index: 1,
673 # start_column_index: 0, end_column_index: 1`
674 #
675 # `Sheet1!A3:B4 == sheet_id: 0,
676 # start_row_index: 2, end_row_index: 4,
677 # start_column_index: 0, end_column_index: 2`
678 #
679 # `Sheet1!A:B == sheet_id: 0,
680 # start_column_index: 0, end_column_index: 2`
681 #
682 # `Sheet1!A5:B == sheet_id: 0,
683 # start_row_index: 4,
684 # start_column_index: 0, end_column_index: 2`
685 #
686 # `Sheet1 == sheet_id:0`
687 #
688 # The start index must always be less than or equal to the end index.
689 # If the start index equals the end index, then the range is empty.
690 # Empty ranges are typically not meaningful and are usually rendered in the
691 # UI as `#REF!`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
693 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
694 &quot;sheetId&quot;: 42, # The sheet this range is on.
695 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
696 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
699 # described by this DeveloperMetadataLookup.
700 # example, if only a metadata ID is specified this considers the
701 # DeveloperMetadata with that particular unique ID. If a metadata key is
702 # specified, this considers all developer metadata with that key. If a
703 # key, visibility, and location type are all specified, this considers all
704 # developer metadata with that key and visibility that are associated with a
705 # location of that type. In general, this
706 # selects all DeveloperMetadata that matches the intersection of all the
707 # specified fields; any field or combination of fields may be specified.
708 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
709 # the specified location. This field either matches exact locations or all
710 # intersecting locations according the specified
711 # locationMatchingStrategy.
712 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
713 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
714 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
715 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
716 # a dimension. The specified DimensionRange must represent a single row
717 # or column; it cannot be unbounded or span multiple rows or columns.
718 # All indexes are zero-based.
719 # Indexes are half open: the start index is inclusive
720 # and the end index is exclusive.
721 # Missing indexes indicate the range is unbounded on that side.
722 &quot;sheetId&quot;: 42, # The sheet this span is on.
723 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
724 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
725 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
726 },
727 },
728 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
729 # DeveloperMetadata.metadata_id.
730 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
731 # DeveloperMetadata.visibility. If left unspecified, all developer
732 # metadata visibile to the requesting project is considered.
733 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
734 # DeveloperMetadata.metadata_value.
735 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
736 # associated with locations of the specified type. For example, when this
737 # field is specified as ROW this lookup
738 # only considers developer metadata associated on rows. If the field is left
739 # unspecified, all location types are considered. This field cannot be
740 # specified as SPREADSHEET when
741 # the locationMatchingStrategy
742 # is specified as INTERSECTING or when the
743 # metadataLocation is specified as a
744 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
745 # developer metadata location. This field also must be left unspecified when
746 # the locationMatchingStrategy
747 # is specified as EXACT.
748 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
749 # specified as EXACT, only developer metadata associated on the exact
750 # location specified is matched. If this field is specified to INTERSECTING,
751 # developer metadata associated on intersecting locations is also
752 # matched. If left unspecified, this field assumes a default value of
753 # INTERSECTING.
754 # If this field is specified, a metadataLocation
755 # must also be specified.
756 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
757 # DeveloperMetadata.metadata_key.
758 },
759 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 },
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 &quot;data&quot;: [ # The new values to apply to the spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700781 { # Data within a range of the spreadsheet.
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700783 # the outer array representing all the data and each inner array
784 # representing a major dimension. Each item in the inner array
785 # corresponds with one cell.
786 #
787 # For output, empty trailing rows and columns will not be included.
788 #
789 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700790 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700791 # To set a cell to an empty value, set the string value to an empty string.
792 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 &quot;&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700794 ],
795 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700796 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
797 # For output, this range indicates the entire requested range,
798 # even though the values will exclude trailing rows and columns.
799 # When appending values, this field represents the range to search for a
800 # table, after which values will be appended.
801 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700802 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700803 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
804 # then requesting `range=A1:B2,majorDimension=ROWS` will return
805 # `[[1,2],[3,4]]`,
806 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
807 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700808 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700809 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
810 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
811 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700812 #
813 # When writing, if this field is not set, it defaults to ROWS.
814 },
815 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700816 &quot;includeValuesInResponse&quot;: True or False, # Determines if the update response should include the values
Dan O'Mearadd494642020-05-01 07:42:23 -0700817 # of the cells that were updated. By default, responses
818 # do not include the updated values. The `updatedData` field within
819 # each of the BatchUpdateValuesResponse.responses contains the updated
820 # values. If the range to write was larger than the range actually written,
821 # the response includes all values in the requested range (excluding trailing
822 # empty rows and columns).
Bu Sun Kim65020912020-05-20 12:08:20 -0700823 &quot;responseValueRenderOption&quot;: &quot;A String&quot;, # Determines how values in the response should be rendered.
824 # The default render option is ValueRenderOption.FORMATTED_VALUE.
825 &quot;responseDateTimeRenderOption&quot;: &quot;A String&quot;, # Determines how dates, times, and durations in the response should be
826 # rendered. This is ignored if response_value_render_option is
827 # FORMATTED_VALUE.
828 # The default dateTime render option is
829 # DateTimeRenderOption.SERIAL_NUMBER.
830 &quot;valueInputOption&quot;: &quot;A String&quot;, # How the input data should be interpreted.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &quot;totalUpdatedColumns&quot;: 42, # The total number of columns where at least one cell in the column was
843 # updated.
844 &quot;totalUpdatedRows&quot;: 42, # The total number of rows where at least one cell in the row was updated.
845 &quot;totalUpdatedSheets&quot;: 42, # The total number of sheets where at least one cell in the sheet was
846 # updated.
847 &quot;totalUpdatedCells&quot;: 42, # The total number of cells updated.
848 &quot;responses&quot;: [ # One UpdateValuesResponse per requested range, in the same order as
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700849 # the requests appeared.
850 { # The response when updating a range of values in a spreadsheet.
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
852 # This is only included if the request&#x27;s `includeValuesInResponse` field
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800853 # was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800855 # the outer array representing all the data and each inner array
856 # representing a major dimension. Each item in the inner array
857 # corresponds with one cell.
858 #
859 # For output, empty trailing rows and columns will not be included.
860 #
861 # For input, supported value types are: bool, string, and double.
862 # Null values will be skipped.
863 # To set a cell to an empty value, set the string value to an empty string.
864 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 &quot;&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800866 ],
867 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
869 # For output, this range indicates the entire requested range,
870 # even though the values will exclude trailing rows and columns.
871 # When appending values, this field represents the range to search for a
872 # table, after which values will be appended.
873 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800874 #
875 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
876 # then requesting `range=A1:B2,majorDimension=ROWS` will return
877 # `[[1,2],[3,4]]`,
878 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
879 # `[[1,3],[2,4]]`.
880 #
881 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
882 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
883 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
884 #
885 # When writing, if this field is not set, it defaults to ROWS.
886 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700887 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
888 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
889 &quot;updatedCells&quot;: 42, # The number of cells updated.
890 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
891 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700892 },
893 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700895 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;responseDateTimeRenderOption&quot;: &quot;A String&quot;, # Determines how dates, times, and durations in the response should be
912 # rendered. This is ignored if response_value_render_option is
913 # FORMATTED_VALUE.
914 # The default dateTime render option is
915 # DateTimeRenderOption.SERIAL_NUMBER.
916 &quot;valueInputOption&quot;: &quot;A String&quot;, # How the input data should be interpreted.
917 &quot;data&quot;: [ # The new values to apply to the spreadsheet. If more than one range is
Dan O'Mearadd494642020-05-01 07:42:23 -0700918 # matched by the specified DataFilter the specified values are applied to
919 # all of those ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 { # A range of values whose location is specified by a DataFilter.
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
922 &quot;dataFilter&quot;: { # Filter that describes what data should be selected or returned from a # The data filter describing the location of the values in the spreadsheet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700923 # request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700924 &quot;gridRange&quot;: { # A range on a sheet. # Selects data that matches the range described by the GridRange.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 # All indexes are zero-based.
926 # Indexes are half open, e.g the start index is inclusive
927 # and the end index is exclusive -- [start_index, end_index).
928 # Missing indexes indicate the range is unbounded on that side.
929 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 #
932 # `Sheet1!A1:A1 == sheet_id: 0,
933 # start_row_index: 0, end_row_index: 1,
934 # start_column_index: 0, end_column_index: 1`
935 #
936 # `Sheet1!A3:B4 == sheet_id: 0,
937 # start_row_index: 2, end_row_index: 4,
938 # start_column_index: 0, end_column_index: 2`
939 #
940 # `Sheet1!A:B == sheet_id: 0,
941 # start_column_index: 0, end_column_index: 2`
942 #
943 # `Sheet1!A5:B == sheet_id: 0,
944 # start_row_index: 4,
945 # start_column_index: 0, end_column_index: 2`
946 #
947 # `Sheet1 == sheet_id:0`
948 #
949 # The start index must always be less than or equal to the end index.
950 # If the start index equals the end index, then the range is empty.
951 # Empty ranges are typically not meaningful and are usually rendered in the
952 # UI as `#REF!`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
954 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
955 &quot;sheetId&quot;: 42, # The sheet this range is on.
956 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
957 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
960 # described by this DeveloperMetadataLookup.
961 # example, if only a metadata ID is specified this considers the
962 # DeveloperMetadata with that particular unique ID. If a metadata key is
963 # specified, this considers all developer metadata with that key. If a
964 # key, visibility, and location type are all specified, this considers all
965 # developer metadata with that key and visibility that are associated with a
966 # location of that type. In general, this
967 # selects all DeveloperMetadata that matches the intersection of all the
968 # specified fields; any field or combination of fields may be specified.
969 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
970 # the specified location. This field either matches exact locations or all
971 # intersecting locations according the specified
972 # locationMatchingStrategy.
973 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
974 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
975 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
976 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
977 # a dimension. The specified DimensionRange must represent a single row
978 # or column; it cannot be unbounded or span multiple rows or columns.
979 # All indexes are zero-based.
980 # Indexes are half open: the start index is inclusive
981 # and the end index is exclusive.
982 # Missing indexes indicate the range is unbounded on that side.
983 &quot;sheetId&quot;: 42, # The sheet this span is on.
984 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
985 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
986 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
987 },
988 },
989 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
990 # DeveloperMetadata.metadata_id.
991 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
992 # DeveloperMetadata.visibility. If left unspecified, all developer
993 # metadata visibile to the requesting project is considered.
994 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
995 # DeveloperMetadata.metadata_value.
996 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
997 # associated with locations of the specified type. For example, when this
998 # field is specified as ROW this lookup
999 # only considers developer metadata associated on rows. If the field is left
1000 # unspecified, all location types are considered. This field cannot be
1001 # specified as SPREADSHEET when
1002 # the locationMatchingStrategy
1003 # is specified as INTERSECTING or when the
1004 # metadataLocation is specified as a
1005 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
1006 # developer metadata location. This field also must be left unspecified when
1007 # the locationMatchingStrategy
1008 # is specified as EXACT.
1009 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
1010 # specified as EXACT, only developer metadata associated on the exact
1011 # location specified is matched. If this field is specified to INTERSECTING,
1012 # developer metadata associated on intersecting locations is also
1013 # matched. If left unspecified, this field assumes a default value of
1014 # INTERSECTING.
1015 # If this field is specified, a metadataLocation
1016 # must also be specified.
1017 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
1018 # DeveloperMetadata.metadata_key.
1019 },
1020 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001021 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;values&quot;: [ # The data to be written. If the provided values exceed any of the ranges
1023 # matched by the data filter then the request fails. If the provided values
1024 # are less than the matched ranges only the specified values are written,
1025 # existing values in the matched ranges remain unaffected.
1026 [
1027 &quot;&quot;,
1028 ],
1029 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 },
1031 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 &quot;includeValuesInResponse&quot;: True or False, # Determines if the update response should include the values
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001033 # of the cells that were updated. By default, responses
1034 # do not include the updated values. The `updatedData` field within
Dan O'Mearadd494642020-05-01 07:42:23 -07001035 # each of the BatchUpdateValuesResponse.responses contains the updated
1036 # values. If the range to write was larger than the range actually written,
1037 # the response includes all values in the requested range (excluding trailing
1038 # empty rows and columns).
Bu Sun Kim65020912020-05-20 12:08:20 -07001039 &quot;responseValueRenderOption&quot;: &quot;A String&quot;, # Determines how values in the response should be rendered.
1040 # The default render option is ValueRenderOption.FORMATTED_VALUE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 }
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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001052 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
1053 &quot;totalUpdatedColumns&quot;: 42, # The total number of columns where at least one cell in the column was
1054 # updated.
1055 &quot;totalUpdatedRows&quot;: 42, # The total number of rows where at least one cell in the row was updated.
1056 &quot;totalUpdatedSheets&quot;: 42, # The total number of sheets where at least one cell in the sheet was
1057 # updated.
1058 &quot;totalUpdatedCells&quot;: 42, # The total number of cells updated.
1059 &quot;responses&quot;: [ # The response for each range updated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 { # The response when updating a range of values by a data filter in a
1061 # spreadsheet.
Bu Sun Kim65020912020-05-20 12:08:20 -07001062 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells in the range matched by the dataFilter after all
1063 # updates were applied. This is only included if the request&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001064 # `includeValuesInResponse` field was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001065 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001066 # the outer array representing all the data and each inner array
1067 # representing a major dimension. Each item in the inner array
1068 # corresponds with one cell.
1069 #
1070 # For output, empty trailing rows and columns will not be included.
1071 #
1072 # For input, supported value types are: bool, string, and double.
1073 # Null values will be skipped.
1074 # To set a cell to an empty value, set the string value to an empty string.
1075 [
Bu Sun Kim65020912020-05-20 12:08:20 -07001076 &quot;&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001077 ],
1078 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001079 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
1080 # For output, this range indicates the entire requested range,
1081 # even though the values will exclude trailing rows and columns.
1082 # When appending values, this field represents the range to search for a
1083 # table, after which values will be appended.
1084 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 #
1086 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1087 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1088 # `[[1,2],[3,4]]`,
1089 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1090 # `[[1,3],[2,4]]`.
1091 #
1092 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1093 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1094 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
1095 #
1096 # When writing, if this field is not set, it defaults to ROWS.
1097 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001098 &quot;dataFilter&quot;: { # Filter that describes what data should be selected or returned from a # The data filter that selected the range that was updated.
1099 # request.
1100 &quot;gridRange&quot;: { # A range on a sheet. # Selects data that matches the range described by the GridRange.
1101 # All indexes are zero-based.
1102 # Indexes are half open, e.g the start index is inclusive
1103 # and the end index is exclusive -- [start_index, end_index).
1104 # Missing indexes indicate the range is unbounded on that side.
1105 #
1106 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
1107 #
1108 # `Sheet1!A1:A1 == sheet_id: 0,
1109 # start_row_index: 0, end_row_index: 1,
1110 # start_column_index: 0, end_column_index: 1`
1111 #
1112 # `Sheet1!A3:B4 == sheet_id: 0,
1113 # start_row_index: 2, end_row_index: 4,
1114 # start_column_index: 0, end_column_index: 2`
1115 #
1116 # `Sheet1!A:B == sheet_id: 0,
1117 # start_column_index: 0, end_column_index: 2`
1118 #
1119 # `Sheet1!A5:B == sheet_id: 0,
1120 # start_row_index: 4,
1121 # start_column_index: 0, end_column_index: 2`
1122 #
1123 # `Sheet1 == sheet_id:0`
1124 #
1125 # The start index must always be less than or equal to the end index.
1126 # If the start index equals the end index, then the range is empty.
1127 # Empty ranges are typically not meaningful and are usually rendered in the
1128 # UI as `#REF!`.
1129 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
1130 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
1131 &quot;sheetId&quot;: 42, # The sheet this range is on.
1132 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
1133 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
1134 },
1135 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
1136 # described by this DeveloperMetadataLookup.
1137 # example, if only a metadata ID is specified this considers the
1138 # DeveloperMetadata with that particular unique ID. If a metadata key is
1139 # specified, this considers all developer metadata with that key. If a
1140 # key, visibility, and location type are all specified, this considers all
1141 # developer metadata with that key and visibility that are associated with a
1142 # location of that type. In general, this
1143 # selects all DeveloperMetadata that matches the intersection of all the
1144 # specified fields; any field or combination of fields may be specified.
1145 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
1146 # the specified location. This field either matches exact locations or all
1147 # intersecting locations according the specified
1148 # locationMatchingStrategy.
1149 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
1150 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
1151 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
1152 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
1153 # a dimension. The specified DimensionRange must represent a single row
1154 # or column; it cannot be unbounded or span multiple rows or columns.
1155 # All indexes are zero-based.
1156 # Indexes are half open: the start index is inclusive
1157 # and the end index is exclusive.
1158 # Missing indexes indicate the range is unbounded on that side.
1159 &quot;sheetId&quot;: 42, # The sheet this span is on.
1160 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
1161 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
1162 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
1163 },
1164 },
1165 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
1166 # DeveloperMetadata.metadata_id.
1167 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
1168 # DeveloperMetadata.visibility. If left unspecified, all developer
1169 # metadata visibile to the requesting project is considered.
1170 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
1171 # DeveloperMetadata.metadata_value.
1172 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
1173 # associated with locations of the specified type. For example, when this
1174 # field is specified as ROW this lookup
1175 # only considers developer metadata associated on rows. If the field is left
1176 # unspecified, all location types are considered. This field cannot be
1177 # specified as SPREADSHEET when
1178 # the locationMatchingStrategy
1179 # is specified as INTERSECTING or when the
1180 # metadataLocation is specified as a
1181 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
1182 # developer metadata location. This field also must be left unspecified when
1183 # the locationMatchingStrategy
1184 # is specified as EXACT.
1185 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
1186 # specified as EXACT, only developer metadata associated on the exact
1187 # location specified is matched. If this field is specified to INTERSECTING,
1188 # developer metadata associated on intersecting locations is also
1189 # matched. If left unspecified, this field assumes a default value of
1190 # INTERSECTING.
1191 # If this field is specified, a metadataLocation
1192 # must also be specified.
1193 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
1194 # DeveloperMetadata.metadata_key.
1195 },
1196 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
1197 },
1198 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
1199 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
1200 &quot;updatedCells&quot;: 42, # The number of cells updated.
1201 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001202 },
1203 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001204 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001232 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
1233 &quot;clearedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that was cleared.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001234 # (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
Bu Sun Kim65020912020-05-20 12:08:20 -07001236 # that was cleared, bounded to the sheet&#x27;s limits.)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001237 }</pre>
1238</div>
1239
1240<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001241 <code class="details" id="get">get(spreadsheetId, range, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=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 Kim65020912020-05-20 12:08:20 -07001248 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
1249This is ignored if value_render_option is
1250FORMATTED_VALUE.
1251The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001252 majorDimension: string, The major dimension that results should use.
1253
Dan O'Mearadd494642020-05-01 07:42:23 -07001254For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then
1255requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`,
1256whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001257`[[1,3],[2,4]]`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 valueRenderOption: string, How values should be represented in the output.
1259The default render option is ValueRenderOption.FORMATTED_VALUE.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001269 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001270 # the outer array representing all the data and each inner array
1271 # representing a major dimension. Each item in the inner array
1272 # corresponds with one cell.
1273 #
1274 # For output, empty trailing rows and columns will not be included.
1275 #
1276 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001277 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001278 # To set a cell to an empty value, set the string value to an empty string.
1279 [
Bu Sun Kim65020912020-05-20 12:08:20 -07001280 &quot;&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001281 ],
1282 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
1284 # For output, this range indicates the entire requested range,
1285 # even though the values will exclude trailing rows and columns.
1286 # When appending values, this field represents the range to search for a
1287 # table, after which values will be appended.
1288 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001289 #
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">
Bu Sun Kim65020912020-05-20 12:08:20 -07001305 <code class="details" id="update">update(spreadsheetId, range, body=None, responseDateTimeRenderOption=None, valueInputOption=None, includeValuesInResponse=None, responseValueRenderOption=None, x__xgafv=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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001318 # the outer array representing all the data and each inner array
1319 # representing a major dimension. Each item in the inner array
1320 # corresponds with one cell.
1321 #
1322 # For output, empty trailing rows and columns will not be included.
1323 #
1324 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001325 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001326 # To set a cell to an empty value, set the string value to an empty string.
1327 [
Bu Sun Kim65020912020-05-20 12:08:20 -07001328 &quot;&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001329 ],
1330 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001331 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
1332 # For output, this range indicates the entire requested range,
1333 # even though the values will exclude trailing rows and columns.
1334 # When appending values, this field represents the range to search for a
1335 # table, after which values will be appended.
1336 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001337 #
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
Bu Sun Kim65020912020-05-20 12:08:20 -07001351 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be
1352rendered. This is ignored if response_value_render_option is
1353FORMATTED_VALUE.
1354The default dateTime render option is
1355DateTimeRenderOption.SERIAL_NUMBER.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001356 valueInputOption: string, How the input data should be interpreted.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001357 includeValuesInResponse: boolean, Determines if the update response should include the values
1358of the cells that were updated. By default, responses
1359do not include the updated values.
Dan O'Mearadd494642020-05-01 07:42:23 -07001360If the range to write was larger than the range actually written, the
1361response includes all values in the requested range (excluding trailing
1362empty rows and columns).
Bu Sun Kim65020912020-05-20 12:08:20 -07001363 responseValueRenderOption: string, Determines how values in the response should be rendered.
1364The default render option is ValueRenderOption.FORMATTED_VALUE.
1365 x__xgafv: string, V1 error format.
1366 Allowed values
1367 1 - v1 error format
1368 2 - v2 error format
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 Kim65020912020-05-20 12:08:20 -07001374 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
1375 # This is only included if the request&#x27;s `includeValuesInResponse` field
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001376 # was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001377 &quot;values&quot;: [ # The data that was read or to be written. This is an array of arrays,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001378 # the outer array representing all the data and each inner array
1379 # representing a major dimension. Each item in the inner array
1380 # corresponds with one cell.
1381 #
1382 # For output, empty trailing rows and columns will not be included.
1383 #
1384 # For input, supported value types are: bool, string, and double.
1385 # Null values will be skipped.
1386 # To set a cell to an empty value, set the string value to an empty string.
1387 [
Bu Sun Kim65020912020-05-20 12:08:20 -07001388 &quot;&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001389 ],
1390 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001391 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
1392 # For output, this range indicates the entire requested range,
1393 # even though the values will exclude trailing rows and columns.
1394 # When appending values, this field represents the range to search for a
1395 # table, after which values will be appended.
1396 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001397 #
1398 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1399 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1400 # `[[1,2],[3,4]]`,
1401 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1402 # `[[1,3],[2,4]]`.
1403 #
1404 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1405 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1406 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
1407 #
1408 # When writing, if this field is not set, it defaults to ROWS.
1409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
1411 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
1412 &quot;updatedCells&quot;: 42, # The number of cells updated.
1413 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
1414 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001415 }</pre>
1416</div>
1417
1418</body></html>