blob: afa78aecb6c3d3e0dcecf021762a60d7373d5fb4 [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">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080078 <code><a href="#append">append(spreadsheetId, range=None, body, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, insertDataOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070079<p class="firstline">Appends values to a spreadsheet. The input range is used to search for</p>
80<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070081 <code><a href="#batchClear">batchClear(spreadsheetId, body, x__xgafv=None)</a></code></p>
82<p class="firstline">Clears one or more ranges of values from a spreadsheet.</p>
83<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#batchGet">batchGet(spreadsheetId, ranges=None, majorDimension=None, dateTimeRenderOption=None, valueRenderOption=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070085<p class="firstline">Returns one or more ranges of values from a spreadsheet.</p>
86<p class="toc_element">
87 <code><a href="#batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070088<p class="firstline">Sets values in one or more ranges of a spreadsheet.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070089<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090 <code><a href="#clear">clear(spreadsheetId, range, body, x__xgafv=None)</a></code></p>
91<p class="firstline">Clears values from a spreadsheet.</p>
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#get">get(spreadsheetId, range, majorDimension=None, dateTimeRenderOption=None, valueRenderOption=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Returns a range of values from a spreadsheet.</p>
95<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080096 <code><a href="#update">update(spreadsheetId, range, body, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070097<p class="firstline">Sets values in a range of a spreadsheet.</p>
98<h3>Method Details</h3>
99<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800100 <code class="details" id="append">append(spreadsheetId, range=None, body, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, insertDataOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700101 <pre>Appends values to a spreadsheet. The input range is used to search for
102existing data and find a "table" within that range. Values will be
103appended to the next row of the table, starting with the first column of
104the table. See the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105[guide](/sheets/api/guides/values#appending_values)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700106and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400107[sample code](/sheets/api/samples/writing#append_values)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700108for specific details of how tables are detected and data is appended.
109
110The caller must specify the spreadsheet ID, range, and
111a valueInputOption. The `valueInputOption` only
112controls how the input data will be added to the sheet (column-wise or
113row-wise), it does not influence what cell the data starts being written
114to.
115
116Args:
117 spreadsheetId: string, The ID of the spreadsheet to update. (required)
118 range: string, The A1 notation of a range to search for a logical table of data.
119Values will be appended after the last row of the table. (required)
120 body: object, The request body. (required)
121 The object takes the form of:
122
123{ # Data within a range of the spreadsheet.
124 "range": "A String", # The range the values cover, in A1 notation.
125 # For output, this range indicates the entire requested range,
126 # even though the values will exclude trailing rows and columns.
127 # When appending values, this field represents the range to search for a
128 # table, after which values will be appended.
129 "values": [ # The data that was read or to be written. This is an array of arrays,
130 # the outer array representing all the data and each inner array
131 # representing a major dimension. Each item in the inner array
132 # corresponds with one cell.
133 #
134 # For output, empty trailing rows and columns will not be included.
135 #
136 # For input, supported value types are: bool, string, and double.
137 # Null values will be skipped.
138 # To set a cell to an empty value, set the string value to an empty string.
139 [
140 "",
141 ],
142 ],
143 "majorDimension": "A String", # The major dimension of the values.
144 #
145 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
146 # then requesting `range=A1:B2,majorDimension=ROWS` will return
147 # `[[1,2],[3,4]]`,
148 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
149 # `[[1,3],[2,4]]`.
150 #
151 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
152 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
153 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
154 #
155 # When writing, if this field is not set, it defaults to ROWS.
156}
157
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700158 valueInputOption: string, How the input data should be interpreted.
159 x__xgafv: string, V1 error format.
160 Allowed values
161 1 - v1 error format
162 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800163 responseValueRenderOption: string, Determines how values in the response should be rendered.
164The default render option is ValueRenderOption.FORMATTED_VALUE.
165 insertDataOption: string, How the input data should be inserted.
166 includeValuesInResponse: boolean, Determines if the update response should include the values
167of the cells that were appended. By default, responses
168do not include the updated values.
169 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].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700173
174Returns:
175 An object of the form:
176
177 { # The response when updating a range of values in a spreadsheet.
178 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
179 "tableRange": "A String", # The range (in A1 notation) of the table that values are being appended to
180 # (before the values were appended).
181 # Empty if no table was found.
182 "updates": { # The response when updating a range of values in a spreadsheet. # Information about the updates that were applied.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700183 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800184 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700185 "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800186 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
187 # This is only included if the request's `includeValuesInResponse` field
188 # was `true`.
189 "range": "A String", # The range the values cover, in A1 notation.
190 # For output, this range indicates the entire requested range,
191 # even though the values will exclude trailing rows and columns.
192 # When appending values, this field represents the range to search for a
193 # table, after which values will be appended.
194 "values": [ # The data that was read or to be written. This is an array of arrays,
195 # the outer array representing all the data and each inner array
196 # representing a major dimension. Each item in the inner array
197 # corresponds with one cell.
198 #
199 # For output, empty trailing rows and columns will not be included.
200 #
201 # For input, supported value types are: bool, string, and double.
202 # Null values will be skipped.
203 # To set a cell to an empty value, set the string value to an empty string.
204 [
205 "",
206 ],
207 ],
208 "majorDimension": "A String", # The major dimension of the values.
209 #
210 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
211 # then requesting `range=A1:B2,majorDimension=ROWS` will return
212 # `[[1,2],[3,4]]`,
213 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
214 # `[[1,3],[2,4]]`.
215 #
216 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
217 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
218 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
219 #
220 # When writing, if this field is not set, it defaults to ROWS.
221 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700222 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800223 "updatedCells": 42, # The number of cells updated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700224 },
225 }</pre>
226</div>
227
228<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700229 <code class="details" id="batchClear">batchClear(spreadsheetId, body, x__xgafv=None)</code>
230 <pre>Clears one or more ranges of values from a spreadsheet.
231The caller must specify the spreadsheet ID and one or more ranges.
232Only values are cleared -- all other properties of the cell (such as
233formatting, data validation, etc..) are kept.
234
235Args:
236 spreadsheetId: string, The ID of the spreadsheet to update. (required)
237 body: object, The request body. (required)
238 The object takes the form of:
239
240{ # The request for clearing more than one range of values in a spreadsheet.
241 "ranges": [ # The ranges to clear, in A1 notation.
242 "A String",
243 ],
244 }
245
246 x__xgafv: string, V1 error format.
247 Allowed values
248 1 - v1 error format
249 2 - v2 error format
250
251Returns:
252 An object of the form:
253
254 { # The response when updating a range of values in a spreadsheet.
255 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
256 "clearedRanges": [ # The ranges that were cleared, in A1 notation.
257 # (If the requests were for an unbounded range or a ranger larger
258 # than the bounds of the sheet, this will be the actual ranges
259 # that were cleared, bounded to the sheet's limits.)
260 "A String",
261 ],
262 }</pre>
263</div>
264
265<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400266 <code class="details" id="batchGet">batchGet(spreadsheetId, ranges=None, majorDimension=None, dateTimeRenderOption=None, valueRenderOption=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700267 <pre>Returns one or more ranges of values from a spreadsheet.
268The caller must specify the spreadsheet ID and one or more ranges.
269
270Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700271 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400272 ranges: string, The A1 notation of the values to retrieve. (repeated)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700273 majorDimension: string, The major dimension that results should use.
274
275For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
276then requesting `range=A1:B2,majorDimension=ROWS` will return
277`[[1,2],[3,4]]`,
278whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
279`[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700280 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700281This is ignored if value_render_option is
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700282FORMATTED_VALUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800283The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400284 valueRenderOption: string, How values should be represented in the output.
285The default render option is ValueRenderOption.FORMATTED_VALUE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700286 x__xgafv: string, V1 error format.
287 Allowed values
288 1 - v1 error format
289 2 - v2 error format
290
291Returns:
292 An object of the form:
293
294 { # The response when retrieving more than one range of values in a spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700295 "spreadsheetId": "A String", # The ID of the spreadsheet the data was retrieved from.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700296 "valueRanges": [ # The requested values. The order of the ValueRanges is the same as the
297 # order of the requested ranges.
298 { # Data within a range of the spreadsheet.
299 "range": "A String", # The range the values cover, in A1 notation.
300 # For output, this range indicates the entire requested range,
301 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700302 # When appending values, this field represents the range to search for a
303 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700304 "values": [ # The data that was read or to be written. This is an array of arrays,
305 # the outer array representing all the data and each inner array
306 # representing a major dimension. Each item in the inner array
307 # corresponds with one cell.
308 #
309 # For output, empty trailing rows and columns will not be included.
310 #
311 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700312 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700313 # To set a cell to an empty value, set the string value to an empty string.
314 [
315 "",
316 ],
317 ],
318 "majorDimension": "A String", # The major dimension of the values.
319 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700320 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
321 # then requesting `range=A1:B2,majorDimension=ROWS` will return
322 # `[[1,2],[3,4]]`,
323 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
324 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700325 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700326 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
327 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
328 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700329 #
330 # When writing, if this field is not set, it defaults to ROWS.
331 },
332 ],
333 }</pre>
334</div>
335
336<div class="method">
337 <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700338 <pre>Sets values in one or more ranges of a spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700339The caller must specify the spreadsheet ID,
340a valueInputOption, and one or more
341ValueRanges.
342
343Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700344 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700345 body: object, The request body. (required)
346 The object takes the form of:
347
348{ # The request for updating more than one range of values in a spreadsheet.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400349 "responseValueRenderOption": "A String", # Determines how values in the response should be rendered.
350 # The default render option is ValueRenderOption.FORMATTED_VALUE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700351 "data": [ # The new values to apply to the spreadsheet.
352 { # Data within a range of the spreadsheet.
353 "range": "A String", # The range the values cover, in A1 notation.
354 # For output, this range indicates the entire requested range,
355 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700356 # When appending values, this field represents the range to search for a
357 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700358 "values": [ # The data that was read or to be written. This is an array of arrays,
359 # the outer array representing all the data and each inner array
360 # representing a major dimension. Each item in the inner array
361 # corresponds with one cell.
362 #
363 # For output, empty trailing rows and columns will not be included.
364 #
365 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700366 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700367 # To set a cell to an empty value, set the string value to an empty string.
368 [
369 "",
370 ],
371 ],
372 "majorDimension": "A String", # The major dimension of the values.
373 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700374 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
375 # then requesting `range=A1:B2,majorDimension=ROWS` will return
376 # `[[1,2],[3,4]]`,
377 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
378 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700379 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700380 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
381 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
382 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700383 #
384 # When writing, if this field is not set, it defaults to ROWS.
385 },
386 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800387 "responseDateTimeRenderOption": "A String", # Determines how dates, times, and durations in the response should be
388 # rendered. This is ignored if response_value_render_option is
389 # FORMATTED_VALUE.
390 # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400391 "valueInputOption": "A String", # How the input data should be interpreted.
392 "includeValuesInResponse": True or False, # Determines if the update response should include the values
393 # of the cells that were updated. By default, responses
394 # do not include the updated values. The `updatedData` field within
395 # each of the BatchUpdateValuesResponse.responses will contain
396 # the updated values. If the range to write was larger than than the range
397 # actually written, the response will include all values in the requested
398 # range (excluding trailing empty rows and columns).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700399 }
400
401 x__xgafv: string, V1 error format.
402 Allowed values
403 1 - v1 error format
404 2 - v2 error format
405
406Returns:
407 An object of the form:
408
409 { # The response when updating a range of values in a spreadsheet.
410 "responses": [ # One UpdateValuesResponse per requested range, in the same order as
411 # the requests appeared.
412 { # The response when updating a range of values in a spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700413 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800414 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700415 "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800416 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
417 # This is only included if the request's `includeValuesInResponse` field
418 # was `true`.
419 "range": "A String", # The range the values cover, in A1 notation.
420 # For output, this range indicates the entire requested range,
421 # even though the values will exclude trailing rows and columns.
422 # When appending values, this field represents the range to search for a
423 # table, after which values will be appended.
424 "values": [ # The data that was read or to be written. This is an array of arrays,
425 # the outer array representing all the data and each inner array
426 # representing a major dimension. Each item in the inner array
427 # corresponds with one cell.
428 #
429 # For output, empty trailing rows and columns will not be included.
430 #
431 # For input, supported value types are: bool, string, and double.
432 # Null values will be skipped.
433 # To set a cell to an empty value, set the string value to an empty string.
434 [
435 "",
436 ],
437 ],
438 "majorDimension": "A String", # The major dimension of the values.
439 #
440 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
441 # then requesting `range=A1:B2,majorDimension=ROWS` will return
442 # `[[1,2],[3,4]]`,
443 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
444 # `[[1,3],[2,4]]`.
445 #
446 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
447 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
448 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
449 #
450 # When writing, if this field is not set, it defaults to ROWS.
451 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700452 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800453 "updatedCells": 42, # The number of cells updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700454 },
455 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700456 "totalUpdatedColumns": 42, # The total number of columns where at least one cell in the column was
457 # updated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400458 "totalUpdatedCells": 42, # The total number of cells updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700459 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400460 "totalUpdatedRows": 42, # The total number of rows where at least one cell in the row was updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700461 "totalUpdatedSheets": 42, # The total number of sheets where at least one cell in the sheet was
462 # updated.
463 }</pre>
464</div>
465
466<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700467 <code class="details" id="clear">clear(spreadsheetId, range, body, x__xgafv=None)</code>
468 <pre>Clears values from a spreadsheet.
469The caller must specify the spreadsheet ID and range.
470Only values are cleared -- all other properties of the cell (such as
471formatting, data validation, etc..) are kept.
472
473Args:
474 spreadsheetId: string, The ID of the spreadsheet to update. (required)
475 range: string, The A1 notation of the values to clear. (required)
476 body: object, The request body. (required)
477 The object takes the form of:
478
479{ # The request for clearing a range of values in a spreadsheet.
480 }
481
482 x__xgafv: string, V1 error format.
483 Allowed values
484 1 - v1 error format
485 2 - v2 error format
486
487Returns:
488 An object of the form:
489
490 { # The response when clearing a range of values in a spreadsheet.
491 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
492 "clearedRange": "A String", # The range (in A1 notation) that was cleared.
493 # (If the request was for an unbounded range or a ranger larger
494 # than the bounds of the sheet, this will be the actual range
495 # that was cleared, bounded to the sheet's limits.)
496 }</pre>
497</div>
498
499<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400500 <code class="details" id="get">get(spreadsheetId, range, majorDimension=None, dateTimeRenderOption=None, valueRenderOption=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700501 <pre>Returns a range of values from a spreadsheet.
502The caller must specify the spreadsheet ID and a range.
503
504Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700505 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700506 range: string, The A1 notation of the values to retrieve. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700507 majorDimension: string, The major dimension that results should use.
508
509For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
510then requesting `range=A1:B2,majorDimension=ROWS` will return
511`[[1,2],[3,4]]`,
512whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
513`[[1,3],[2,4]]`.
514 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700515This is ignored if value_render_option is
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700516FORMATTED_VALUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800517The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400518 valueRenderOption: string, How values should be represented in the output.
519The default render option is ValueRenderOption.FORMATTED_VALUE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700520 x__xgafv: string, V1 error format.
521 Allowed values
522 1 - v1 error format
523 2 - v2 error format
524
525Returns:
526 An object of the form:
527
528 { # Data within a range of the spreadsheet.
529 "range": "A String", # The range the values cover, in A1 notation.
530 # For output, this range indicates the entire requested range,
531 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700532 # When appending values, this field represents the range to search for a
533 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700534 "values": [ # The data that was read or to be written. This is an array of arrays,
535 # the outer array representing all the data and each inner array
536 # representing a major dimension. Each item in the inner array
537 # corresponds with one cell.
538 #
539 # For output, empty trailing rows and columns will not be included.
540 #
541 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700542 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700543 # To set a cell to an empty value, set the string value to an empty string.
544 [
545 "",
546 ],
547 ],
548 "majorDimension": "A String", # The major dimension of the values.
549 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700550 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
551 # then requesting `range=A1:B2,majorDimension=ROWS` will return
552 # `[[1,2],[3,4]]`,
553 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
554 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700555 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700556 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
557 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
558 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700559 #
560 # When writing, if this field is not set, it defaults to ROWS.
561 }</pre>
562</div>
563
564<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800565 <code class="details" id="update">update(spreadsheetId, range, body, valueInputOption=None, x__xgafv=None, responseValueRenderOption=None, includeValuesInResponse=None, responseDateTimeRenderOption=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700566 <pre>Sets values in a range of a spreadsheet.
567The caller must specify the spreadsheet ID, range, and
568a valueInputOption.
569
570Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700571 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700572 range: string, The A1 notation of the values to update. (required)
573 body: object, The request body. (required)
574 The object takes the form of:
575
576{ # Data within a range of the spreadsheet.
577 "range": "A String", # The range the values cover, in A1 notation.
578 # For output, this range indicates the entire requested range,
579 # even though the values will exclude trailing rows and columns.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700580 # When appending values, this field represents the range to search for a
581 # table, after which values will be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700582 "values": [ # The data that was read or to be written. This is an array of arrays,
583 # the outer array representing all the data and each inner array
584 # representing a major dimension. Each item in the inner array
585 # corresponds with one cell.
586 #
587 # For output, empty trailing rows and columns will not be included.
588 #
589 # For input, supported value types are: bool, string, and double.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700590 # Null values will be skipped.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700591 # To set a cell to an empty value, set the string value to an empty string.
592 [
593 "",
594 ],
595 ],
596 "majorDimension": "A String", # The major dimension of the values.
597 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700598 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
599 # then requesting `range=A1:B2,majorDimension=ROWS` will return
600 # `[[1,2],[3,4]]`,
601 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
602 # `[[1,3],[2,4]]`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700603 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700604 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
605 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
606 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700607 #
608 # When writing, if this field is not set, it defaults to ROWS.
609}
610
611 valueInputOption: string, How the input data should be interpreted.
612 x__xgafv: string, V1 error format.
613 Allowed values
614 1 - v1 error format
615 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800616 responseValueRenderOption: string, Determines how values in the response should be rendered.
617The default render option is ValueRenderOption.FORMATTED_VALUE.
618 includeValuesInResponse: boolean, Determines if the update response should include the values
619of the cells that were updated. By default, responses
620do not include the updated values.
621If the range to write was larger than than the range actually written,
622the response will include all values in the requested range (excluding
623trailing empty rows and columns).
624 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be
625rendered. This is ignored if response_value_render_option is
626FORMATTED_VALUE.
627The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700628
629Returns:
630 An object of the form:
631
632 { # The response when updating a range of values in a spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700633 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800634 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700635 "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800636 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied.
637 # This is only included if the request's `includeValuesInResponse` field
638 # was `true`.
639 "range": "A String", # The range the values cover, in A1 notation.
640 # For output, this range indicates the entire requested range,
641 # even though the values will exclude trailing rows and columns.
642 # When appending values, this field represents the range to search for a
643 # table, after which values will be appended.
644 "values": [ # The data that was read or to be written. This is an array of arrays,
645 # the outer array representing all the data and each inner array
646 # representing a major dimension. Each item in the inner array
647 # corresponds with one cell.
648 #
649 # For output, empty trailing rows and columns will not be included.
650 #
651 # For input, supported value types are: bool, string, and double.
652 # Null values will be skipped.
653 # To set a cell to an empty value, set the string value to an empty string.
654 [
655 "",
656 ],
657 ],
658 "majorDimension": "A String", # The major dimension of the values.
659 #
660 # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
661 # then requesting `range=A1:B2,majorDimension=ROWS` will return
662 # `[[1,2],[3,4]]`,
663 # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
664 # `[[1,3],[2,4]]`.
665 #
666 # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
667 # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
668 # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
669 #
670 # When writing, if this field is not set, it defaults to ROWS.
671 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700672 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800673 "updatedCells": 42, # The number of cells updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700674 }</pre>
675</div>
676
677</body></html>