File: sheets_v4.spreadsheets.values.html

package info (click to toggle)
python-googleapi 1.5.5-1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 39,832 kB
  • ctags: 5,921
  • sloc: python: 7,176; makefile: 64; sh: 53; xml: 5
file content (531 lines) | stat: -rw-r--r-- 22,009 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<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>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#append">append(spreadsheetId, range=None, body, insertDataOption=None, valueInputOption=None, x__xgafv=None)</a></code></p>
<p class="firstline">Appends values to a spreadsheet. The input range is used to search for</p>
<p class="toc_element">
  <code><a href="#batchClear">batchClear(spreadsheetId, body, x__xgafv=None)</a></code></p>
<p class="firstline">Clears one or more ranges of values from a spreadsheet.</p>
<p class="toc_element">
  <code><a href="#batchGet">batchGet(spreadsheetId, valueRenderOption=None, majorDimension=None, ranges=None, dateTimeRenderOption=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns one or more ranges of values from a spreadsheet.</p>
<p class="toc_element">
  <code><a href="#batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</a></code></p>
<p class="firstline">Sets values in one or more ranges of a spreadsheet.</p>
<p class="toc_element">
  <code><a href="#clear">clear(spreadsheetId, range, body, x__xgafv=None)</a></code></p>
<p class="firstline">Clears values from a spreadsheet.</p>
<p class="toc_element">
  <code><a href="#get">get(spreadsheetId, range, valueRenderOption=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns a range of values from a spreadsheet.</p>
<p class="toc_element">
  <code><a href="#update">update(spreadsheetId, range, body, valueInputOption=None, x__xgafv=None)</a></code></p>
<p class="firstline">Sets values in a range of a spreadsheet.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="append">append(spreadsheetId, range=None, body, insertDataOption=None, valueInputOption=None, x__xgafv=None)</code>
  <pre>Appends values to a spreadsheet. The input range is used to search for
existing data and find a "table" within that range. Values will be
appended to the next row of the table, starting with the first column of
the table. See the
[guide](/sheets/guides/values#appending_values)
and
[sample code](/sheets/samples/writing#append_values)
for specific details of how tables are detected and data is appended.

The caller must specify the spreadsheet ID, range, and
a valueInputOption.  The `valueInputOption` only
controls how the input data will be added to the sheet (column-wise or
row-wise), it does not influence what cell the data starts being written
to.

Args:
  spreadsheetId: string, The ID of the spreadsheet to update. (required)
  range: string, The A1 notation of a range to search for a logical table of data.
Values will be appended after the last row of the table. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Data within a range of the spreadsheet.
  "range": "A String", # The range the values cover, in A1 notation.
      # For output, this range indicates the entire requested range,
      # even though the values will exclude trailing rows and columns.
      # When appending values, this field represents the range to search for a
      # table, after which values will be appended.
  "values": [ # The data that was read or to be written.  This is an array of arrays,
      # the outer array representing all the data and each inner array
      # representing a major dimension. Each item in the inner array
      # corresponds with one cell.
      # 
      # For output, empty trailing rows and columns will not be included.
      # 
      # For input, supported value types are: bool, string, and double.
      # Null values will be skipped.
      # To set a cell to an empty value, set the string value to an empty string.
    [
      "",
    ],
  ],
  "majorDimension": "A String", # The major dimension of the values.
      # 
      # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
      # then requesting `range=A1:B2,majorDimension=ROWS` will return
      # `[[1,2],[3,4]]`,
      # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
      # `[[1,3],[2,4]]`.
      # 
      # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
      # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
      # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
      # 
      # When writing, if this field is not set, it defaults to ROWS.
}

  insertDataOption: string, How the input data should be inserted.
  valueInputOption: string, How the input data should be interpreted.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response when updating a range of values in a spreadsheet.
    "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
    "tableRange": "A String", # The range (in A1 notation) of the table that values are being appended to
        # (before the values were appended).
        # Empty if no table was found.
    "updates": { # The response when updating a range of values in a spreadsheet. # Information about the updates that were applied.
      "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
      "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
      "updatedCells": 42, # The number of cells updated.
      "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
      "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
    },
  }</pre>
</div>

<div class="method">
    <code class="details" id="batchClear">batchClear(spreadsheetId, body, x__xgafv=None)</code>
  <pre>Clears one or more ranges of values from a spreadsheet.
The caller must specify the spreadsheet ID and one or more ranges.
Only values are cleared -- all other properties of the cell (such as
formatting, data validation, etc..) are kept.

Args:
  spreadsheetId: string, The ID of the spreadsheet to update. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # The request for clearing more than one range of values in a spreadsheet.
    "ranges": [ # The ranges to clear, in A1 notation.
      "A String",
    ],
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response when updating a range of values in a spreadsheet.
    "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
    "clearedRanges": [ # The ranges that were cleared, in A1 notation.
        # (If the requests were for an unbounded range or a ranger larger
        #  than the bounds of the sheet, this will be the actual ranges
        #  that were cleared, bounded to the sheet's limits.)
      "A String",
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="batchGet">batchGet(spreadsheetId, valueRenderOption=None, majorDimension=None, ranges=None, dateTimeRenderOption=None, x__xgafv=None)</code>
  <pre>Returns one or more ranges of values from a spreadsheet.
The caller must specify the spreadsheet ID and one or more ranges.

Args:
  spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
  valueRenderOption: string, How values should be represented in the output.
  majorDimension: string, The major dimension that results should use.

For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
then requesting `range=A1:B2,majorDimension=ROWS` will return
`[[1,2],[3,4]]`,
whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
`[[1,3],[2,4]]`.
  ranges: string, The A1 notation of the values to retrieve. (repeated)
  dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
This is ignored if value_render_option is
FORMATTED_VALUE.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response when retrieving more than one range of values in a spreadsheet.
    "spreadsheetId": "A String", # The ID of the spreadsheet the data was retrieved from.
    "valueRanges": [ # The requested values. The order of the ValueRanges is the same as the
        # order of the requested ranges.
      { # Data within a range of the spreadsheet.
        "range": "A String", # The range the values cover, in A1 notation.
            # For output, this range indicates the entire requested range,
            # even though the values will exclude trailing rows and columns.
            # When appending values, this field represents the range to search for a
            # table, after which values will be appended.
        "values": [ # The data that was read or to be written.  This is an array of arrays,
            # the outer array representing all the data and each inner array
            # representing a major dimension. Each item in the inner array
            # corresponds with one cell.
            #
            # For output, empty trailing rows and columns will not be included.
            #
            # For input, supported value types are: bool, string, and double.
            # Null values will be skipped.
            # To set a cell to an empty value, set the string value to an empty string.
          [
            "",
          ],
        ],
        "majorDimension": "A String", # The major dimension of the values.
            #
            # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
            # then requesting `range=A1:B2,majorDimension=ROWS` will return
            # `[[1,2],[3,4]]`,
            # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
            # `[[1,3],[2,4]]`.
            #
            # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
            # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
            # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
            #
            # When writing, if this field is not set, it defaults to ROWS.
      },
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</code>
  <pre>Sets values in one or more ranges of a spreadsheet.
The caller must specify the spreadsheet ID,
a valueInputOption, and one or more
ValueRanges.

Args:
  spreadsheetId: string, The ID of the spreadsheet to update. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # The request for updating more than one range of values in a spreadsheet.
    "data": [ # The new values to apply to the spreadsheet.
      { # Data within a range of the spreadsheet.
        "range": "A String", # The range the values cover, in A1 notation.
            # For output, this range indicates the entire requested range,
            # even though the values will exclude trailing rows and columns.
            # When appending values, this field represents the range to search for a
            # table, after which values will be appended.
        "values": [ # The data that was read or to be written.  This is an array of arrays,
            # the outer array representing all the data and each inner array
            # representing a major dimension. Each item in the inner array
            # corresponds with one cell.
            #
            # For output, empty trailing rows and columns will not be included.
            #
            # For input, supported value types are: bool, string, and double.
            # Null values will be skipped.
            # To set a cell to an empty value, set the string value to an empty string.
          [
            "",
          ],
        ],
        "majorDimension": "A String", # The major dimension of the values.
            #
            # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
            # then requesting `range=A1:B2,majorDimension=ROWS` will return
            # `[[1,2],[3,4]]`,
            # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
            # `[[1,3],[2,4]]`.
            #
            # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
            # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
            # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
            #
            # When writing, if this field is not set, it defaults to ROWS.
      },
    ],
    "valueInputOption": "A String", # How the input data should be interpreted.
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response when updating a range of values in a spreadsheet.
    "responses": [ # One UpdateValuesResponse per requested range, in the same order as
        # the requests appeared.
      { # The response when updating a range of values in a spreadsheet.
        "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
        "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
        "updatedCells": 42, # The number of cells updated.
        "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
        "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
      },
    ],
    "totalUpdatedCells": 42, # The total number of cells updated.
    "totalUpdatedColumns": 42, # The total number of columns where at least one cell in the column was
        # updated.
    "totalUpdatedRows": 42, # The total number of rows where at least one cell in the row was updated.
    "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
    "totalUpdatedSheets": 42, # The total number of sheets where at least one cell in the sheet was
        # updated.
  }</pre>
</div>

<div class="method">
    <code class="details" id="clear">clear(spreadsheetId, range, body, x__xgafv=None)</code>
  <pre>Clears values from a spreadsheet.
The caller must specify the spreadsheet ID and range.
Only values are cleared -- all other properties of the cell (such as
formatting, data validation, etc..) are kept.

Args:
  spreadsheetId: string, The ID of the spreadsheet to update. (required)
  range: string, The A1 notation of the values to clear. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # The request for clearing a range of values in a spreadsheet.
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response when clearing a range of values in a spreadsheet.
    "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
    "clearedRange": "A String", # The range (in A1 notation) that was cleared.
        # (If the request was for an unbounded range or a ranger larger
        #  than the bounds of the sheet, this will be the actual range
        #  that was cleared, bounded to the sheet's limits.)
  }</pre>
</div>

<div class="method">
    <code class="details" id="get">get(spreadsheetId, range, valueRenderOption=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</code>
  <pre>Returns a range of values from a spreadsheet.
The caller must specify the spreadsheet ID and a range.

Args:
  spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
  range: string, The A1 notation of the values to retrieve. (required)
  valueRenderOption: string, How values should be represented in the output.
  majorDimension: string, The major dimension that results should use.

For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
then requesting `range=A1:B2,majorDimension=ROWS` will return
`[[1,2],[3,4]]`,
whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
`[[1,3],[2,4]]`.
  dateTimeRenderOption: string, How dates, times, and durations should be represented in the output.
This is ignored if value_render_option is
FORMATTED_VALUE.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Data within a range of the spreadsheet.
    "range": "A String", # The range the values cover, in A1 notation.
        # For output, this range indicates the entire requested range,
        # even though the values will exclude trailing rows and columns.
        # When appending values, this field represents the range to search for a
        # table, after which values will be appended.
    "values": [ # The data that was read or to be written.  This is an array of arrays,
        # the outer array representing all the data and each inner array
        # representing a major dimension. Each item in the inner array
        # corresponds with one cell.
        #
        # For output, empty trailing rows and columns will not be included.
        #
        # For input, supported value types are: bool, string, and double.
        # Null values will be skipped.
        # To set a cell to an empty value, set the string value to an empty string.
      [
        "",
      ],
    ],
    "majorDimension": "A String", # The major dimension of the values.
        #
        # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
        # then requesting `range=A1:B2,majorDimension=ROWS` will return
        # `[[1,2],[3,4]]`,
        # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
        # `[[1,3],[2,4]]`.
        #
        # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
        # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
        # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
        #
        # When writing, if this field is not set, it defaults to ROWS.
  }</pre>
</div>

<div class="method">
    <code class="details" id="update">update(spreadsheetId, range, body, valueInputOption=None, x__xgafv=None)</code>
  <pre>Sets values in a range of a spreadsheet.
The caller must specify the spreadsheet ID, range, and
a valueInputOption.

Args:
  spreadsheetId: string, The ID of the spreadsheet to update. (required)
  range: string, The A1 notation of the values to update. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Data within a range of the spreadsheet.
  "range": "A String", # The range the values cover, in A1 notation.
      # For output, this range indicates the entire requested range,
      # even though the values will exclude trailing rows and columns.
      # When appending values, this field represents the range to search for a
      # table, after which values will be appended.
  "values": [ # The data that was read or to be written.  This is an array of arrays,
      # the outer array representing all the data and each inner array
      # representing a major dimension. Each item in the inner array
      # corresponds with one cell.
      # 
      # For output, empty trailing rows and columns will not be included.
      # 
      # For input, supported value types are: bool, string, and double.
      # Null values will be skipped.
      # To set a cell to an empty value, set the string value to an empty string.
    [
      "",
    ],
  ],
  "majorDimension": "A String", # The major dimension of the values.
      # 
      # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
      # then requesting `range=A1:B2,majorDimension=ROWS` will return
      # `[[1,2],[3,4]]`,
      # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
      # `[[1,3],[2,4]]`.
      # 
      # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`
      # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`
      # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
      # 
      # When writing, if this field is not set, it defaults to ROWS.
}

  valueInputOption: string, How the input data should be interpreted.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response when updating a range of values in a spreadsheet.
    "updatedRange": "A String", # The range (in A1 notation) that updates were applied to.
    "updatedColumns": 42, # The number of columns where at least one cell in the column was updated.
    "updatedCells": 42, # The number of cells updated.
    "updatedRows": 42, # The number of rows where at least one cell in the row was updated.
    "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
  }</pre>
</div>

</body></html>