blob: 37e867df8f680d5182ea4526b0050e0bd99e9738 [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 Kim4ed7d3f2020-05-27 12:20:54 -070078 <code><a href="#append">append(spreadsheetId, range, body=None, valueInputOption=None, includeValuesInResponse=None, insertDataOption=None, responseValueRenderOption=None, responseDateTimeRenderOption=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 Kim4ed7d3f2020-05-27 12:20:54 -0700105 <code><a href="#update">update(spreadsheetId, range, body=None, responseValueRenderOption=None, responseDateTimeRenderOption=None, valueInputOption=None, includeValuesInResponse=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 Kim4ed7d3f2020-05-27 12:20:54 -0700109 <code class="details" id="append">append(spreadsheetId, range, body=None, valueInputOption=None, includeValuesInResponse=None, insertDataOption=None, responseValueRenderOption=None, responseDateTimeRenderOption=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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700167 valueInputOption: string, How the input data should be interpreted.
168 includeValuesInResponse: boolean, Determines if the update response should include the values
169of the cells that were appended. By default, responses
170do not include the updated values.
171 insertDataOption: string, How the input data should be inserted.
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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800174 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be
175rendered. This is ignored if response_value_render_option is
176FORMATTED_VALUE.
177The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700192 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
193 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
194 &quot;updatedCells&quot;: 42, # The number of cells updated.
195 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
196 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
198 # This is only included if the request&#x27;s `includeValuesInResponse` field
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800199 # was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &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 -0800201 # the outer array representing all the data and each inner array
202 # representing a major dimension. Each item in the inner array
203 # corresponds with one cell.
204 #
205 # For output, empty trailing rows and columns will not be included.
206 #
207 # For input, supported value types are: bool, string, and double.
208 # Null values will be skipped.
209 # To set a cell to an empty value, set the string value to an empty string.
210 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 &quot;&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800212 ],
213 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
215 # For output, this range indicates the entire requested range,
216 # even though the values will exclude trailing rows and columns.
217 # When appending values, this field represents the range to search for a
218 # table, after which values will be appended.
219 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800220 #
221 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
222 # then requesting `range=A1:B2,majorDimension=ROWS` will return
223 # `[[1,2],[3,4]]`,
224 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
225 # `[[1,3],[2,4]]`.
226 #
227 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
228 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
229 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
230 #
231 # When writing, if this field is not set, it defaults to ROWS.
232 },
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;clearedRanges&quot;: [ # The ranges that were cleared, in A1 notation. If the requests are for an
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 # unbounded range or a ranger larger than the bounds of the sheet, this is
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 # the actual ranges that were cleared, bounded to the sheet&#x27;s limits.
267 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700268 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700269 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700270 }</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 Kim4ed7d3f2020-05-27 12:20:54 -0700291 &quot;developerMetadataLookup&quot;: { # 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 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
302 # associated with locations of the specified type. For example, when this
303 # field is specified as ROW this lookup
304 # only considers developer metadata associated on rows. If the field is left
305 # unspecified, all location types are considered. This field cannot be
306 # specified as SPREADSHEET when
307 # the locationMatchingStrategy
308 # is specified as INTERSECTING or when the
309 # metadataLocation is specified as a
310 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
311 # developer metadata location. This field also must be left unspecified when
312 # the locationMatchingStrategy
313 # is specified as EXACT.
314 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
315 # DeveloperMetadata.metadata_key.
316 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
317 # specified as EXACT, only developer metadata associated on the exact
318 # location specified is matched. If this field is specified to INTERSECTING,
319 # developer metadata associated on intersecting locations is also
320 # matched. If left unspecified, this field assumes a default value of
321 # INTERSECTING.
322 # If this field is specified, a metadataLocation
323 # must also be specified.
324 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
325 # the specified location. This field either matches exact locations or all
326 # intersecting locations according the specified
327 # locationMatchingStrategy.
328 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
329 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
330 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
331 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
332 # a dimension. The specified DimensionRange must represent a single row
333 # or column; it cannot be unbounded or span multiple rows or columns.
334 # All indexes are zero-based.
335 # Indexes are half open: the start index is inclusive
336 # and the end index is exclusive.
337 # Missing indexes indicate the range is unbounded on that side.
338 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
339 &quot;sheetId&quot;: 42, # The sheet this span is on.
340 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
341 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
342 },
343 },
344 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
345 # DeveloperMetadata.metadata_id.
346 &quot;visibility&quot;: &quot;A String&quot;, # 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 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
350 # DeveloperMetadata.metadata_value.
351 },
352 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &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 -0700354 # 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 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 #
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!`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &quot;sheetId&quot;: 42, # The sheet this range is on.
383 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
384 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700385 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
386 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700387 },
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.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700511 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
512 # described by this DeveloperMetadataLookup.
513 # example, if only a metadata ID is specified this considers the
514 # DeveloperMetadata with that particular unique ID. If a metadata key is
515 # specified, this considers all developer metadata with that key. If a
516 # key, visibility, and location type are all specified, this considers all
517 # developer metadata with that key and visibility that are associated with a
518 # location of that type. In general, this
519 # selects all DeveloperMetadata that matches the intersection of all the
520 # specified fields; any field or combination of fields may be specified.
521 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
522 # associated with locations of the specified type. For example, when this
523 # field is specified as ROW this lookup
524 # only considers developer metadata associated on rows. If the field is left
525 # unspecified, all location types are considered. This field cannot be
526 # specified as SPREADSHEET when
527 # the locationMatchingStrategy
528 # is specified as INTERSECTING or when the
529 # metadataLocation is specified as a
530 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
531 # developer metadata location. This field also must be left unspecified when
532 # the locationMatchingStrategy
533 # is specified as EXACT.
534 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
535 # DeveloperMetadata.metadata_key.
536 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
537 # specified as EXACT, only developer metadata associated on the exact
538 # location specified is matched. If this field is specified to INTERSECTING,
539 # developer metadata associated on intersecting locations is also
540 # matched. If left unspecified, this field assumes a default value of
541 # INTERSECTING.
542 # If this field is specified, a metadataLocation
543 # must also be specified.
544 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
545 # the specified location. This field either matches exact locations or all
546 # intersecting locations according the specified
547 # locationMatchingStrategy.
548 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
549 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
550 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
551 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
552 # a dimension. The specified DimensionRange must represent a single row
553 # or column; it cannot be unbounded or span multiple rows or columns.
554 # All indexes are zero-based.
555 # Indexes are half open: the start index is inclusive
556 # and the end index is exclusive.
557 # Missing indexes indicate the range is unbounded on that side.
558 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
559 &quot;sheetId&quot;: 42, # The sheet this span is on.
560 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
561 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
562 },
563 },
564 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
565 # DeveloperMetadata.metadata_id.
566 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
567 # DeveloperMetadata.visibility. If left unspecified, all developer
568 # metadata visibile to the requesting project is considered.
569 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
570 # DeveloperMetadata.metadata_value.
571 },
572 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim65020912020-05-20 12:08:20 -0700573 &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 -0700574 # All indexes are zero-based.
575 # Indexes are half open, e.g the start index is inclusive
576 # and the end index is exclusive -- [start_index, end_index).
577 # Missing indexes indicate the range is unbounded on that side.
578 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 #
581 # `Sheet1!A1:A1 == sheet_id: 0,
582 # start_row_index: 0, end_row_index: 1,
583 # start_column_index: 0, end_column_index: 1`
584 #
585 # `Sheet1!A3:B4 == sheet_id: 0,
586 # start_row_index: 2, end_row_index: 4,
587 # start_column_index: 0, end_column_index: 2`
588 #
589 # `Sheet1!A:B == sheet_id: 0,
590 # start_column_index: 0, end_column_index: 2`
591 #
592 # `Sheet1!A5:B == sheet_id: 0,
593 # start_row_index: 4,
594 # start_column_index: 0, end_column_index: 2`
595 #
596 # `Sheet1 == sheet_id:0`
597 #
598 # The start index must always be less than or equal to the end index.
599 # If the start index equals the end index, then the range is empty.
600 # Empty ranges are typically not meaningful and are usually rendered in the
601 # UI as `#REF!`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 &quot;sheetId&quot;: 42, # The sheet this range is on.
603 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
604 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700605 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
606 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 },
608 },
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 Kim4ed7d3f2020-05-27 12:20:54 -0700663 &quot;developerMetadataLookup&quot;: { # 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 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
674 # associated with locations of the specified type. For example, when this
675 # field is specified as ROW this lookup
676 # only considers developer metadata associated on rows. If the field is left
677 # unspecified, all location types are considered. This field cannot be
678 # specified as SPREADSHEET when
679 # the locationMatchingStrategy
680 # is specified as INTERSECTING or when the
681 # metadataLocation is specified as a
682 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
683 # developer metadata location. This field also must be left unspecified when
684 # the locationMatchingStrategy
685 # is specified as EXACT.
686 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
687 # DeveloperMetadata.metadata_key.
688 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
689 # specified as EXACT, only developer metadata associated on the exact
690 # location specified is matched. If this field is specified to INTERSECTING,
691 # developer metadata associated on intersecting locations is also
692 # matched. If left unspecified, this field assumes a default value of
693 # INTERSECTING.
694 # If this field is specified, a metadataLocation
695 # must also be specified.
696 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
697 # the specified location. This field either matches exact locations or all
698 # intersecting locations according the specified
699 # locationMatchingStrategy.
700 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
701 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
702 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
703 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
704 # a dimension. The specified DimensionRange must represent a single row
705 # or column; it cannot be unbounded or span multiple rows or columns.
706 # All indexes are zero-based.
707 # Indexes are half open: the start index is inclusive
708 # and the end index is exclusive.
709 # Missing indexes indicate the range is unbounded on that side.
710 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
711 &quot;sheetId&quot;: 42, # The sheet this span is on.
712 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
713 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
714 },
715 },
716 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
717 # DeveloperMetadata.metadata_id.
718 &quot;visibility&quot;: &quot;A String&quot;, # 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 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
722 # DeveloperMetadata.metadata_value.
723 },
724 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &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 -0700726 # 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 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700731 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 #
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!`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &quot;sheetId&quot;: 42, # The sheet this range is on.
755 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
756 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700757 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
758 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 },
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.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700842 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;totalUpdatedColumns&quot;: 42, # The total number of columns where at least one cell in the column was
844 # updated.
845 &quot;totalUpdatedRows&quot;: 42, # The total number of rows where at least one cell in the row was updated.
846 &quot;totalUpdatedSheets&quot;: 42, # The total number of sheets where at least one cell in the sheet was
847 # updated.
848 &quot;totalUpdatedCells&quot;: 42, # The total number of cells updated.
849 &quot;responses&quot;: [ # One UpdateValuesResponse per requested range, in the same order as
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700850 # the requests appeared.
851 { # The response when updating a range of values in a spreadsheet.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700852 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
853 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
854 &quot;updatedCells&quot;: 42, # The number of cells updated.
855 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
856 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
858 # This is only included if the request&#x27;s `includeValuesInResponse` field
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800859 # was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 &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 -0800861 # the outer array representing all the data and each inner array
862 # representing a major dimension. Each item in the inner array
863 # corresponds with one cell.
864 #
865 # For output, empty trailing rows and columns will not be included.
866 #
867 # For input, supported value types are: bool, string, and double.
868 # Null values will be skipped.
869 # To set a cell to an empty value, set the string value to an empty string.
870 [
Bu Sun Kim65020912020-05-20 12:08:20 -0700871 &quot;&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800872 ],
873 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
875 # For output, this range indicates the entire requested range,
876 # even though the values will exclude trailing rows and columns.
877 # When appending values, this field represents the range to search for a
878 # table, after which values will be appended.
879 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800880 #
881 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
882 # then requesting `range=A1:B2,majorDimension=ROWS` will return
883 # `[[1,2],[3,4]]`,
884 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
885 # `[[1,3],[2,4]]`.
886 #
887 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
888 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
889 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
890 #
891 # When writing, if this field is not set, it defaults to ROWS.
892 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700893 },
894 ],
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 Kim4ed7d3f2020-05-27 12:20:54 -0700911 &quot;responseValueRenderOption&quot;: &quot;A String&quot;, # Determines how values in the response should be rendered.
912 # The default render option is ValueRenderOption.FORMATTED_VALUE.
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 &quot;responseDateTimeRenderOption&quot;: &quot;A String&quot;, # Determines how dates, times, and durations in the response should be
914 # rendered. This is ignored if response_value_render_option is
915 # FORMATTED_VALUE.
916 # The default dateTime render option is
917 # DateTimeRenderOption.SERIAL_NUMBER.
918 &quot;valueInputOption&quot;: &quot;A String&quot;, # How the input data should be interpreted.
919 &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 -0700920 # matched by the specified DataFilter the specified values are applied to
921 # all of those ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700922 { # A range of values whose location is specified by a DataFilter.
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
924 &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 -0700925 # request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700926 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
927 # described by this DeveloperMetadataLookup.
928 # example, if only a metadata ID is specified this considers the
929 # DeveloperMetadata with that particular unique ID. If a metadata key is
930 # specified, this considers all developer metadata with that key. If a
931 # key, visibility, and location type are all specified, this considers all
932 # developer metadata with that key and visibility that are associated with a
933 # location of that type. In general, this
934 # selects all DeveloperMetadata that matches the intersection of all the
935 # specified fields; any field or combination of fields may be specified.
936 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
937 # associated with locations of the specified type. For example, when this
938 # field is specified as ROW this lookup
939 # only considers developer metadata associated on rows. If the field is left
940 # unspecified, all location types are considered. This field cannot be
941 # specified as SPREADSHEET when
942 # the locationMatchingStrategy
943 # is specified as INTERSECTING or when the
944 # metadataLocation is specified as a
945 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
946 # developer metadata location. This field also must be left unspecified when
947 # the locationMatchingStrategy
948 # is specified as EXACT.
949 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
950 # DeveloperMetadata.metadata_key.
951 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
952 # specified as EXACT, only developer metadata associated on the exact
953 # location specified is matched. If this field is specified to INTERSECTING,
954 # developer metadata associated on intersecting locations is also
955 # matched. If left unspecified, this field assumes a default value of
956 # INTERSECTING.
957 # If this field is specified, a metadataLocation
958 # must also be specified.
959 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
960 # the specified location. This field either matches exact locations or all
961 # intersecting locations according the specified
962 # locationMatchingStrategy.
963 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
964 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
965 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
966 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
967 # a dimension. The specified DimensionRange must represent a single row
968 # or column; it cannot be unbounded or span multiple rows or columns.
969 # All indexes are zero-based.
970 # Indexes are half open: the start index is inclusive
971 # and the end index is exclusive.
972 # Missing indexes indicate the range is unbounded on that side.
973 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
974 &quot;sheetId&quot;: 42, # The sheet this span is on.
975 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
976 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
977 },
978 },
979 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
980 # DeveloperMetadata.metadata_id.
981 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
982 # DeveloperMetadata.visibility. If left unspecified, all developer
983 # metadata visibile to the requesting project is considered.
984 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
985 # DeveloperMetadata.metadata_value.
986 },
987 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &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 -0700989 # All indexes are zero-based.
990 # Indexes are half open, e.g the start index is inclusive
991 # and the end index is exclusive -- [start_index, end_index).
992 # Missing indexes indicate the range is unbounded on that side.
993 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700994 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995 #
996 # `Sheet1!A1:A1 == sheet_id: 0,
997 # start_row_index: 0, end_row_index: 1,
998 # start_column_index: 0, end_column_index: 1`
999 #
1000 # `Sheet1!A3:B4 == sheet_id: 0,
1001 # start_row_index: 2, end_row_index: 4,
1002 # start_column_index: 0, end_column_index: 2`
1003 #
1004 # `Sheet1!A:B == sheet_id: 0,
1005 # start_column_index: 0, end_column_index: 2`
1006 #
1007 # `Sheet1!A5:B == sheet_id: 0,
1008 # start_row_index: 4,
1009 # start_column_index: 0, end_column_index: 2`
1010 #
1011 # `Sheet1 == sheet_id:0`
1012 #
1013 # The start index must always be less than or equal to the end index.
1014 # If the start index equals the end index, then the range is empty.
1015 # Empty ranges are typically not meaningful and are usually rendered in the
1016 # UI as `#REF!`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 &quot;sheetId&quot;: 42, # The sheet this range is on.
1018 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
1019 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001020 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
1021 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001022 },
1023 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 &quot;values&quot;: [ # The data to be written. If the provided values exceed any of the ranges
1025 # matched by the data filter then the request fails. If the provided values
1026 # are less than the matched ranges only the specified values are written,
1027 # existing values in the matched ranges remain unaffected.
1028 [
1029 &quot;&quot;,
1030 ],
1031 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001032 },
1033 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;includeValuesInResponse&quot;: True or False, # Determines if the update response should include the values
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 # of the cells that were updated. By default, responses
1036 # do not include the updated values. The `updatedData` field within
Dan O'Mearadd494642020-05-01 07:42:23 -07001037 # each of the BatchUpdateValuesResponse.responses contains the updated
1038 # values. If the range to write was larger than the range actually written,
1039 # the response includes all values in the requested range (excluding trailing
1040 # empty rows and columns).
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 Kim4ed7d3f2020-05-27 12:20:54 -07001062 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001063 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells in the range matched by the dataFilter after all
1064 # updates were applied. This is only included if the request&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 # `includeValuesInResponse` field was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001066 &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 -07001067 # the outer array representing all the data and each inner array
1068 # representing a major dimension. Each item in the inner array
1069 # corresponds with one cell.
1070 #
1071 # For output, empty trailing rows and columns will not be included.
1072 #
1073 # For input, supported value types are: bool, string, and double.
1074 # Null values will be skipped.
1075 # To set a cell to an empty value, set the string value to an empty string.
1076 [
Bu Sun Kim65020912020-05-20 12:08:20 -07001077 &quot;&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 ],
1079 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
1081 # For output, this range indicates the entire requested range,
1082 # even though the values will exclude trailing rows and columns.
1083 # When appending values, this field represents the range to search for a
1084 # table, after which values will be appended.
1085 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 #
1087 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1088 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1089 # `[[1,2],[3,4]]`,
1090 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1091 # `[[1,3],[2,4]]`.
1092 #
1093 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1094 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1095 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
1096 #
1097 # When writing, if this field is not set, it defaults to ROWS.
1098 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &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.
1100 # request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001101 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For # Selects data associated with the developer metadata matching the criteria
1102 # described by this DeveloperMetadataLookup.
1103 # example, if only a metadata ID is specified this considers the
1104 # DeveloperMetadata with that particular unique ID. If a metadata key is
1105 # specified, this considers all developer metadata with that key. If a
1106 # key, visibility, and location type are all specified, this considers all
1107 # developer metadata with that key and visibility that are associated with a
1108 # location of that type. In general, this
1109 # selects all DeveloperMetadata that matches the intersection of all the
1110 # specified fields; any field or combination of fields may be specified.
1111 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are
1112 # associated with locations of the specified type. For example, when this
1113 # field is specified as ROW this lookup
1114 # only considers developer metadata associated on rows. If the field is left
1115 # unspecified, all location types are considered. This field cannot be
1116 # specified as SPREADSHEET when
1117 # the locationMatchingStrategy
1118 # is specified as INTERSECTING or when the
1119 # metadataLocation is specified as a
1120 # non-spreadsheet location: spreadsheet metadata cannot intersect any other
1121 # developer metadata location. This field also must be left unspecified when
1122 # the locationMatchingStrategy
1123 # is specified as EXACT.
1124 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
1125 # DeveloperMetadata.metadata_key.
1126 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is
1127 # specified as EXACT, only developer metadata associated on the exact
1128 # location specified is matched. If this field is specified to INTERSECTING,
1129 # developer metadata associated on intersecting locations is also
1130 # matched. If left unspecified, this field assumes a default value of
1131 # INTERSECTING.
1132 # If this field is specified, a metadataLocation
1133 # must also be specified.
1134 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with
1135 # the specified location. This field either matches exact locations or all
1136 # intersecting locations according the specified
1137 # locationMatchingStrategy.
1138 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
1139 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
1140 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
1141 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. # Represents the row or column when metadata is associated with
1142 # a dimension. The specified DimensionRange must represent a single row
1143 # or column; it cannot be unbounded or span multiple rows or columns.
1144 # All indexes are zero-based.
1145 # Indexes are half open: the start index is inclusive
1146 # and the end index is exclusive.
1147 # Missing indexes indicate the range is unbounded on that side.
1148 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
1149 &quot;sheetId&quot;: 42, # The sheet this span is on.
1150 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
1151 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
1152 },
1153 },
1154 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching
1155 # DeveloperMetadata.metadata_id.
1156 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
1157 # DeveloperMetadata.visibility. If left unspecified, all developer
1158 # metadata visibile to the requesting project is considered.
1159 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching
1160 # DeveloperMetadata.metadata_value.
1161 },
1162 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
Bu Sun Kim65020912020-05-20 12:08:20 -07001163 &quot;gridRange&quot;: { # A range on a sheet. # Selects data that matches the range described by the GridRange.
1164 # All indexes are zero-based.
1165 # Indexes are half open, e.g the start index is inclusive
1166 # and the end index is exclusive -- [start_index, end_index).
1167 # Missing indexes indicate the range is unbounded on that side.
1168 #
1169 # For example, if `&quot;Sheet1&quot;` is sheet ID 0, then:
1170 #
1171 # `Sheet1!A1:A1 == sheet_id: 0,
1172 # start_row_index: 0, end_row_index: 1,
1173 # start_column_index: 0, end_column_index: 1`
1174 #
1175 # `Sheet1!A3:B4 == sheet_id: 0,
1176 # start_row_index: 2, end_row_index: 4,
1177 # start_column_index: 0, end_column_index: 2`
1178 #
1179 # `Sheet1!A:B == sheet_id: 0,
1180 # start_column_index: 0, end_column_index: 2`
1181 #
1182 # `Sheet1!A5:B == sheet_id: 0,
1183 # start_row_index: 4,
1184 # start_column_index: 0, end_column_index: 2`
1185 #
1186 # `Sheet1 == sheet_id:0`
1187 #
1188 # The start index must always be less than or equal to the end index.
1189 # If the start index equals the end index, then the range is empty.
1190 # Empty ranges are typically not meaningful and are usually rendered in the
1191 # UI as `#REF!`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &quot;sheetId&quot;: 42, # The sheet this range is on.
1193 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
1194 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001195 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
1196 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
Bu Sun Kim65020912020-05-20 12:08:20 -07001197 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001198 },
1199 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
1200 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
1201 &quot;updatedCells&quot;: 42, # The number of cells 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 Kim4ed7d3f2020-05-27 12:20:54 -07001305 <code class="details" id="update">update(spreadsheetId, range, body=None, responseValueRenderOption=None, responseDateTimeRenderOption=None, valueInputOption=None, includeValuesInResponse=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 Kim4ed7d3f2020-05-27 12:20:54 -07001351 responseValueRenderOption: string, Determines how values in the response should be rendered.
1352The default render option is ValueRenderOption.FORMATTED_VALUE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001353 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be
1354rendered. This is ignored if response_value_render_option is
1355FORMATTED_VALUE.
1356The default dateTime render option is
1357DateTimeRenderOption.SERIAL_NUMBER.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001358 valueInputOption: string, How the input data should be interpreted.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001359 includeValuesInResponse: boolean, Determines if the update response should include the values
1360of the cells that were updated. By default, responses
1361do not include the updated values.
Dan O'Mearadd494642020-05-01 07:42:23 -07001362If the range to write was larger than the range actually written, the
1363response includes all values in the requested range (excluding trailing
1364empty rows and columns).
Bu Sun Kim65020912020-05-20 12:08:20 -07001365 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 Kim4ed7d3f2020-05-27 12:20:54 -07001374 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
1375 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
1376 &quot;updatedCells&quot;: 42, # The number of cells updated.
1377 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
1378 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Bu Sun Kim65020912020-05-20 12:08:20 -07001379 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
1380 # This is only included if the request&#x27;s `includeValuesInResponse` field
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001381 # was `true`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001382 &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 -08001383 # the outer array representing all the data and each inner array
1384 # representing a major dimension. Each item in the inner array
1385 # corresponds with one cell.
1386 #
1387 # For output, empty trailing rows and columns will not be included.
1388 #
1389 # For input, supported value types are: bool, string, and double.
1390 # Null values will be skipped.
1391 # To set a cell to an empty value, set the string value to an empty string.
1392 [
Bu Sun Kim65020912020-05-20 12:08:20 -07001393 &quot;&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001394 ],
1395 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &quot;range&quot;: &quot;A String&quot;, # The range the values cover, in A1 notation.
1397 # For output, this range indicates the entire requested range,
1398 # even though the values will exclude trailing rows and columns.
1399 # When appending values, this field represents the range to search for a
1400 # table, after which values will be appended.
1401 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001402 #
1403 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
1404 # then requesting `range=A1:B2,majorDimension=ROWS` will return
1405 # `[[1,2],[3,4]]`,
1406 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
1407 # `[[1,3],[2,4]]`.
1408 #
1409 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
1410 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
1411 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
1412 #
1413 # When writing, if this field is not set, it defaults to ROWS.
1414 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001415 }</pre>
1416</div>
1417
1418</body></html>