blob: c94b4ca47d819f902d0b37b7c191e8716c33dc2e [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">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080078 <code><a href="#append">append(spreadsheetId, range, body=None, includeValuesInResponse=None, insertDataOption=None, responseDateTimeRenderOption=None, responseValueRenderOption=None, valueInputOption=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070079<p class="firstline">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/api/guides/values#appending_values) and [sample code](/sheets/api/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.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070080<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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">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.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070083<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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080087 <code><a href="#batchGet">batchGet(spreadsheetId, dateTimeRenderOption=None, majorDimension=None, ranges=None, valueRenderOption=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070089<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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Returns one or more ranges of values that match the specified data filters. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that match any of the data filters in the request will be returned.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.</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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
99 <code><a href="#clear">clear(spreadsheetId, range, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700100<p class="firstline">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.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 <code><a href="#close">close()</a></code></p>
103<p class="firstline">Close httplib2 connections.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700104<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800105 <code><a href="#get">get(spreadsheetId, range, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106<p class="firstline">Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.</p>
107<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800108 <code><a href="#update">update(spreadsheetId, range, body=None, includeValuesInResponse=None, responseDateTimeRenderOption=None, responseValueRenderOption=None, valueInputOption=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109<p class="firstline">Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700110<h3>Method Details</h3>
111<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800112 <code class="details" id="append">append(spreadsheetId, range, body=None, includeValuesInResponse=None, insertDataOption=None, responseDateTimeRenderOption=None, responseValueRenderOption=None, valueInputOption=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700113 <pre>Appends values to a spreadsheet. The input range is used to search for existing data and find a &quot;table&quot; 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/api/guides/values#appending_values) and [sample code](/sheets/api/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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700114
115Args:
116 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700117 range: string, The A1 notation of a range to search for a logical table of data. Values are appended after the last row of the table. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700119 The object takes the form of:
120
121{ # Data within a range of the spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800122 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
123 &quot;range&quot;: &quot;A String&quot;, # 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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800124 &quot;values&quot;: [ # 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.
125 [
126 &quot;&quot;,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700127 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800128 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800129}
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700130
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800131 includeValuesInResponse: boolean, Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800132 insertDataOption: string, How the input data should be inserted.
133 Allowed values
134 OVERWRITE - The new data overwrites existing data in the areas it is written. (Note: adding data to the end of the sheet will still insert new rows or columns so the data can be written.)
135 INSERT_ROWS - Rows are inserted for the new data.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800136 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
137 Allowed values
138 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in &quot;serial number&quot; format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it&#x27;s 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.
139 FORMATTED_STRING - Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800140 responseValueRenderOption: string, Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE.
141 Allowed values
142 FORMATTED_VALUE - Values will be calculated &amp; formatted in the reply according to the cell&#x27;s formatting. Formatting is based on the spreadsheet&#x27;s locale, not the requesting user&#x27;s locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `&quot;$1.23&quot;`.
143 UNFORMATTED_VALUE - Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.
144 FORMULA - Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `&quot;=A1&quot;`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800145 valueInputOption: string, How the input data should be interpreted.
146 Allowed values
147 INPUT_VALUE_OPTION_UNSPECIFIED - Default input value. This value must not be used.
148 RAW - The values the user has entered will not be parsed and will be stored as-is.
149 USER_ENTERED - The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 x__xgafv: string, V1 error format.
151 Allowed values
152 1 - v1 error format
153 2 - v2 error format
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700154
155Returns:
156 An object of the form:
157
158 { # The response when updating a range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800159 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
160 &quot;tableRange&quot;: &quot;A String&quot;, # 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.
161 &quot;updates&quot;: { # The response when updating a range of values in a spreadsheet. # Information about the updates that were applied.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800162 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800163 &quot;updatedCells&quot;: 42, # The number of cells updated.
164 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
165 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied. This is only included if the request&#x27;s `includeValuesInResponse` field was `true`.
166 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
167 &quot;range&quot;: &quot;A String&quot;, # 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.
168 &quot;values&quot;: [ # 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.
169 [
170 &quot;&quot;,
171 ],
172 ],
173 },
174 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
175 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
176 },
177}</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700178</div>
179
180<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 <code class="details" id="batchClear">batchClear(spreadsheetId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700182 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700183
184Args:
185 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700187 The object takes the form of:
188
189{ # The request for clearing more than one range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800190 &quot;ranges&quot;: [ # The ranges to clear, in A1 notation.
191 &quot;A String&quot;,
192 ],
193}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194
195 x__xgafv: string, V1 error format.
196 Allowed values
197 1 - v1 error format
198 2 - v2 error format
199
200Returns:
201 An object of the form:
202
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400203 { # The response when clearing a range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800204 &quot;clearedRanges&quot;: [ # The ranges that were cleared, in A1 notation. If the requests are for an unbounded range or a ranger larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet&#x27;s limits.
205 &quot;A String&quot;,
206 ],
207 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
208}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209</div>
210
211<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 <code class="details" id="batchClearByDataFilter">batchClearByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700213 <pre>Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214
215Args:
216 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 The object takes the form of:
219
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700220{ # The request for clearing more than one range selected by a DataFilter in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800221 &quot;dataFilters&quot;: [ # The DataFilters used to determine which ranges to clear.
222 { # Filter that describes what data should be selected or returned from a request.
223 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
224 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For example, if only a metadata ID is specified this considers the DeveloperMetadata with that particular unique ID. If a metadata key is specified, this considers all developer metadata with that key. If a key, visibility, and location type are all specified, this considers all developer metadata with that key and visibility that are associated with a location of that type. In general, this selects all DeveloperMetadata that matches the intersection of all the specified fields; any field or combination of fields may be specified. # Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup.
225 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified.
226 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location: spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT.
227 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id.
228 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key.
229 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy.
230 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. All indexes are zero-based. Indexes are half open: the start index is inclusive and the end index is exclusive. Missing indexes indicate the range is unbounded on that side. # Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column; it cannot be unbounded or span multiple rows or columns.
231 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
232 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
233 &quot;sheetId&quot;: 42, # The sheet this span is on.
234 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700235 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800236 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
237 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
238 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700239 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800240 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value.
241 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visibile to the requesting project is considered.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800243 &quot;gridRange&quot;: { # A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate the range is unbounded on that side. For example, if `&quot;Sheet1&quot;` is sheet ID 0, then: `Sheet1!A1:A1 == sheet_id: 0, start_row_index: 0, end_row_index: 1, start_column_index: 0, end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 0, start_row_index: 2, end_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 0, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 0, start_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1 == sheet_id:0` The start index must always be less than or equal to the end index. If the start index equals the end index, then the range is empty. Empty ranges are typically not meaningful and are usually rendered in the UI as `#REF!`. # Selects data that matches the range described by the GridRange.
244 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
245 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
246 &quot;sheetId&quot;: 42, # The sheet this range is on.
247 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
248 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
249 },
250 },
251 ],
252}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700253
254 x__xgafv: string, V1 error format.
255 Allowed values
256 1 - v1 error format
257 2 - v2 error format
258
259Returns:
260 An object of the form:
261
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700262 { # The response when clearing a range of values selected with DataFilters in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800263 &quot;clearedRanges&quot;: [ # The ranges that were cleared, in A1 notation. If the requests are for an unbounded range or a ranger larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet&#x27;s limits.
264 &quot;A String&quot;,
265 ],
266 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
267}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268</div>
269
270<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800271 <code class="details" id="batchGet">batchGet(spreadsheetId, dateTimeRenderOption=None, majorDimension=None, ranges=None, valueRenderOption=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700272 <pre>Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700273
274Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700275 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800276 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700277 Allowed values
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800278 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in &quot;serial number&quot; format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it&#x27;s 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.
279 FORMATTED_STRING - Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale).
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800280 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` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
281 Allowed values
282 DIMENSION_UNSPECIFIED - The default value, do not use.
283 ROWS - Operates on the rows of a sheet.
284 COLUMNS - Operates on the columns of a sheet.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800285 ranges: string, The A1 notation of the values to retrieve. (repeated)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800286 valueRenderOption: string, How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800287 Allowed values
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800288 FORMATTED_VALUE - Values will be calculated &amp; formatted in the reply according to the cell&#x27;s formatting. Formatting is based on the spreadsheet&#x27;s locale, not the requesting user&#x27;s locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `&quot;$1.23&quot;`.
289 UNFORMATTED_VALUE - Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.
290 FORMULA - Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `&quot;=A1&quot;`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700291 x__xgafv: string, V1 error format.
292 Allowed values
293 1 - v1 error format
294 2 - v2 error format
295
296Returns:
297 An object of the form:
298
299 { # The response when retrieving more than one range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800300 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The ID of the spreadsheet the data was retrieved from.
301 &quot;valueRanges&quot;: [ # The requested values. The order of the ValueRanges is the same as the order of the requested ranges.
302 { # Data within a range of the spreadsheet.
303 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
304 &quot;range&quot;: &quot;A String&quot;, # 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.
305 &quot;values&quot;: [ # 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.
306 [
307 &quot;&quot;,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800308 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800309 ],
310 },
311 ],
312}</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700313</div>
314
315<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700316 <code class="details" id="batchGetByDataFilter">batchGetByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700317 <pre>Returns one or more ranges of values that match the specified data filters. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that match any of the data filters in the request will be returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318
319Args:
320 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 The object takes the form of:
323
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700324{ # The request for retrieving a range of values in a spreadsheet selected by a set of DataFilters.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800325 &quot;dataFilters&quot;: [ # The data filters used to match the ranges of values to retrieve. Ranges that match any of the specified data filters are included in the response.
326 { # Filter that describes what data should be selected or returned from a request.
327 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
328 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For example, if only a metadata ID is specified this considers the DeveloperMetadata with that particular unique ID. If a metadata key is specified, this considers all developer metadata with that key. If a key, visibility, and location type are all specified, this considers all developer metadata with that key and visibility that are associated with a location of that type. In general, this selects all DeveloperMetadata that matches the intersection of all the specified fields; any field or combination of fields may be specified. # Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup.
329 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified.
330 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location: spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT.
331 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id.
332 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key.
333 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy.
334 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. All indexes are zero-based. Indexes are half open: the start index is inclusive and the end index is exclusive. Missing indexes indicate the range is unbounded on that side. # Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column; it cannot be unbounded or span multiple rows or columns.
335 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
336 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
337 &quot;sheetId&quot;: 42, # The sheet this span is on.
338 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700339 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800340 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
341 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
342 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700343 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800344 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value.
345 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visibile to the requesting project is considered.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800347 &quot;gridRange&quot;: { # A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate the range is unbounded on that side. For example, if `&quot;Sheet1&quot;` is sheet ID 0, then: `Sheet1!A1:A1 == sheet_id: 0, start_row_index: 0, end_row_index: 1, start_column_index: 0, end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 0, start_row_index: 2, end_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 0, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 0, start_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1 == sheet_id:0` The start index must always be less than or equal to the end index. If the start index equals the end index, then the range is empty. Empty ranges are typically not meaningful and are usually rendered in the UI as `#REF!`. # Selects data that matches the range described by the GridRange.
348 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
349 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
350 &quot;sheetId&quot;: 42, # The sheet this range is on.
351 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
352 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
353 },
354 },
355 ],
356 &quot;dateTimeRenderOption&quot;: &quot;A String&quot;, # How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
357 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then a request that selects that range and sets `majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas a request that sets `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
358 &quot;valueRenderOption&quot;: &quot;A String&quot;, # How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.
359}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360
361 x__xgafv: string, V1 error format.
362 Allowed values
363 1 - v1 error format
364 2 - v2 error format
365
366Returns:
367 An object of the form:
368
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700369 { # The response when retrieving more than one range of values in a spreadsheet selected by DataFilters.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800370 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The ID of the spreadsheet the data was retrieved from.
371 &quot;valueRanges&quot;: [ # The requested values with the list of data filters that matched them.
372 { # A value range that was matched by one or more data filers.
373 &quot;dataFilters&quot;: [ # The DataFilters from the request that matched the range of values.
374 { # Filter that describes what data should be selected or returned from a request.
375 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
376 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For example, if only a metadata ID is specified this considers the DeveloperMetadata with that particular unique ID. If a metadata key is specified, this considers all developer metadata with that key. If a key, visibility, and location type are all specified, this considers all developer metadata with that key and visibility that are associated with a location of that type. In general, this selects all DeveloperMetadata that matches the intersection of all the specified fields; any field or combination of fields may be specified. # Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup.
377 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified.
378 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location: spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT.
379 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id.
380 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key.
381 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy.
382 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. All indexes are zero-based. Indexes are half open: the start index is inclusive and the end index is exclusive. Missing indexes indicate the range is unbounded on that side. # Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column; it cannot be unbounded or span multiple rows or columns.
383 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
384 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
385 &quot;sheetId&quot;: 42, # The sheet this span is on.
386 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800387 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800388 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
389 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
390 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800391 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800392 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value.
393 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visibile to the requesting project is considered.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800394 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800395 &quot;gridRange&quot;: { # A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate the range is unbounded on that side. For example, if `&quot;Sheet1&quot;` is sheet ID 0, then: `Sheet1!A1:A1 == sheet_id: 0, start_row_index: 0, end_row_index: 1, start_column_index: 0, end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 0, start_row_index: 2, end_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 0, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 0, start_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1 == sheet_id:0` The start index must always be less than or equal to the end index. If the start index equals the end index, then the range is empty. Empty ranges are typically not meaningful and are usually rendered in the UI as `#REF!`. # Selects data that matches the range described by the GridRange.
396 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
397 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
398 &quot;sheetId&quot;: 42, # The sheet this range is on.
399 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
400 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
401 },
402 },
403 ],
404 &quot;valueRange&quot;: { # Data within a range of the spreadsheet. # The values matched by the DataFilter.
405 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
406 &quot;range&quot;: &quot;A String&quot;, # 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.
407 &quot;values&quot;: [ # 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.
408 [
409 &quot;&quot;,
410 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800411 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800413 },
414 ],
415}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416</div>
417
418<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700419 <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700420 <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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700421
422Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700423 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700424 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700425 The object takes the form of:
426
427{ # The request for updating more than one range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800428 &quot;data&quot;: [ # The new values to apply to the spreadsheet.
429 { # Data within a range of the spreadsheet.
430 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
431 &quot;range&quot;: &quot;A String&quot;, # 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.
432 &quot;values&quot;: [ # 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.
433 [
434 &quot;&quot;,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800435 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800436 ],
437 },
438 ],
439 &quot;includeValuesInResponse&quot;: True or False, # Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. The `updatedData` field within each of the BatchUpdateValuesResponse.responses contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).
440 &quot;responseDateTimeRenderOption&quot;: &quot;A String&quot;, # Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is DateTimeRenderOption.SERIAL_NUMBER.
441 &quot;responseValueRenderOption&quot;: &quot;A String&quot;, # Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE.
442 &quot;valueInputOption&quot;: &quot;A String&quot;, # How the input data should be interpreted.
443}
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700444
445 x__xgafv: string, V1 error format.
446 Allowed values
447 1 - v1 error format
448 2 - v2 error format
449
450Returns:
451 An object of the form:
452
453 { # The response when updating a range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800454 &quot;responses&quot;: [ # One UpdateValuesResponse per requested range, in the same order as the requests appeared.
455 { # The response when updating a range of values in a spreadsheet.
456 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
457 &quot;updatedCells&quot;: 42, # The number of cells updated.
458 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
459 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied. This is only included if the request&#x27;s `includeValuesInResponse` field was `true`.
460 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
461 &quot;range&quot;: &quot;A String&quot;, # 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.
462 &quot;values&quot;: [ # 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.
463 [
464 &quot;&quot;,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800465 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800466 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800467 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800468 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
469 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
470 },
471 ],
472 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
473 &quot;totalUpdatedCells&quot;: 42, # The total number of cells updated.
474 &quot;totalUpdatedColumns&quot;: 42, # The total number of columns where at least one cell in the column was updated.
475 &quot;totalUpdatedRows&quot;: 42, # The total number of rows where at least one cell in the row was updated.
476 &quot;totalUpdatedSheets&quot;: 42, # The total number of sheets where at least one cell in the sheet was updated.
477}</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700478</div>
479
480<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700481 <code class="details" id="batchUpdateByDataFilter">batchUpdateByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700482 <pre>Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483
484Args:
485 spreadsheetId: string, The ID of the spreadsheet to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 The object takes the form of:
488
489{ # The request for updating more than one range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800490 &quot;data&quot;: [ # The new values to apply to the spreadsheet. If more than one range is matched by the specified DataFilter the specified values are applied to all of those ranges.
491 { # A range of values whose location is specified by a DataFilter.
492 &quot;dataFilter&quot;: { # Filter that describes what data should be selected or returned from a request. # The data filter describing the location of the values in the spreadsheet.
493 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
494 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For example, if only a metadata ID is specified this considers the DeveloperMetadata with that particular unique ID. If a metadata key is specified, this considers all developer metadata with that key. If a key, visibility, and location type are all specified, this considers all developer metadata with that key and visibility that are associated with a location of that type. In general, this selects all DeveloperMetadata that matches the intersection of all the specified fields; any field or combination of fields may be specified. # Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup.
495 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified.
496 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location: spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT.
497 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id.
498 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key.
499 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy.
500 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. All indexes are zero-based. Indexes are half open: the start index is inclusive and the end index is exclusive. Missing indexes indicate the range is unbounded on that side. # Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column; it cannot be unbounded or span multiple rows or columns.
501 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
502 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
503 &quot;sheetId&quot;: 42, # The sheet this span is on.
504 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800505 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800506 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
507 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
508 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800509 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800510 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value.
511 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visibile to the requesting project is considered.
512 },
513 &quot;gridRange&quot;: { # A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate the range is unbounded on that side. For example, if `&quot;Sheet1&quot;` is sheet ID 0, then: `Sheet1!A1:A1 == sheet_id: 0, start_row_index: 0, end_row_index: 1, start_column_index: 0, end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 0, start_row_index: 2, end_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 0, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 0, start_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1 == sheet_id:0` The start index must always be less than or equal to the end index. If the start index equals the end index, then the range is empty. Empty ranges are typically not meaningful and are usually rendered in the UI as `#REF!`. # Selects data that matches the range described by the GridRange.
514 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
515 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
516 &quot;sheetId&quot;: 42, # The sheet this range is on.
517 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
518 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800519 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800521 &quot;majorDimension&quot;: &quot;A String&quot;, # The major dimension of the values.
522 &quot;values&quot;: [ # The data to be written. If the provided values exceed any of the ranges matched by the data filter then the request fails. If the provided values are less than the matched ranges only the specified values are written, existing values in the matched ranges remain unaffected.
523 [
524 &quot;&quot;,
525 ],
526 ],
527 },
528 ],
529 &quot;includeValuesInResponse&quot;: True or False, # Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. The `updatedData` field within each of the BatchUpdateValuesResponse.responses contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).
530 &quot;responseDateTimeRenderOption&quot;: &quot;A String&quot;, # Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is DateTimeRenderOption.SERIAL_NUMBER.
531 &quot;responseValueRenderOption&quot;: &quot;A String&quot;, # Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE.
532 &quot;valueInputOption&quot;: &quot;A String&quot;, # How the input data should be interpreted.
533}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534
535 x__xgafv: string, V1 error format.
536 Allowed values
537 1 - v1 error format
538 2 - v2 error format
539
540Returns:
541 An object of the form:
542
543 { # The response when updating a range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800544 &quot;responses&quot;: [ # The response for each range updated.
545 { # The response when updating a range of values by a data filter in a spreadsheet.
546 &quot;dataFilter&quot;: { # Filter that describes what data should be selected or returned from a request. # The data filter that selected the range that was updated.
547 &quot;a1Range&quot;: &quot;A String&quot;, # Selects data that matches the specified A1 range.
548 &quot;developerMetadataLookup&quot;: { # Selects DeveloperMetadata that matches all of the specified fields. For example, if only a metadata ID is specified this considers the DeveloperMetadata with that particular unique ID. If a metadata key is specified, this considers all developer metadata with that key. If a key, visibility, and location type are all specified, this considers all developer metadata with that key and visibility that are associated with a location of that type. In general, this selects all DeveloperMetadata that matches the intersection of all the specified fields; any field or combination of fields may be specified. # Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup.
549 &quot;locationMatchingStrategy&quot;: &quot;A String&quot;, # Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified.
550 &quot;locationType&quot;: &quot;A String&quot;, # Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location: spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT.
551 &quot;metadataId&quot;: 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id.
552 &quot;metadataKey&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key.
553 &quot;metadataLocation&quot;: { # A location where metadata may be associated in a spreadsheet. # Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy.
554 &quot;dimensionRange&quot;: { # A range along a single dimension on a sheet. All indexes are zero-based. Indexes are half open: the start index is inclusive and the end index is exclusive. Missing indexes indicate the range is unbounded on that side. # Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column; it cannot be unbounded or span multiple rows or columns.
555 &quot;dimension&quot;: &quot;A String&quot;, # The dimension of the span.
556 &quot;endIndex&quot;: 42, # The end (exclusive) of the span, or not set if unbounded.
557 &quot;sheetId&quot;: 42, # The sheet this span is on.
558 &quot;startIndex&quot;: 42, # The start (inclusive) of the span, or not set if unbounded.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700559 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800560 &quot;locationType&quot;: &quot;A String&quot;, # The type of location this object represents. This field is read-only.
561 &quot;sheetId&quot;: 42, # The ID of the sheet when metadata is associated with an entire sheet.
562 &quot;spreadsheet&quot;: True or False, # True when metadata is associated with an entire spreadsheet.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700563 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800564 &quot;metadataValue&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value.
565 &quot;visibility&quot;: &quot;A String&quot;, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visibile to the requesting project is considered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800567 &quot;gridRange&quot;: { # A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate the range is unbounded on that side. For example, if `&quot;Sheet1&quot;` is sheet ID 0, then: `Sheet1!A1:A1 == sheet_id: 0, start_row_index: 0, end_row_index: 1, start_column_index: 0, end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 0, start_row_index: 2, end_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 0, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 0, start_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1 == sheet_id:0` The start index must always be less than or equal to the end index. If the start index equals the end index, then the range is empty. Empty ranges are typically not meaningful and are usually rendered in the UI as `#REF!`. # Selects data that matches the range described by the GridRange.
568 &quot;endColumnIndex&quot;: 42, # The end column (exclusive) of the range, or not set if unbounded.
569 &quot;endRowIndex&quot;: 42, # The end row (exclusive) of the range, or not set if unbounded.
570 &quot;sheetId&quot;: 42, # The sheet this range is on.
571 &quot;startColumnIndex&quot;: 42, # The start column (inclusive) of the range, or not set if unbounded.
572 &quot;startRowIndex&quot;: 42, # The start row (inclusive) of the range, or not set if unbounded.
573 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700574 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800575 &quot;updatedCells&quot;: 42, # The number of cells updated.
576 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
577 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells in the range matched by the dataFilter after all updates were applied. This is only included if the request&#x27;s `includeValuesInResponse` field was `true`.
578 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
579 &quot;range&quot;: &quot;A String&quot;, # 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.
580 &quot;values&quot;: [ # 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.
581 [
582 &quot;&quot;,
583 ],
584 ],
585 },
586 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
587 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
588 },
589 ],
590 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
591 &quot;totalUpdatedCells&quot;: 42, # The total number of cells updated.
592 &quot;totalUpdatedColumns&quot;: 42, # The total number of columns where at least one cell in the column was updated.
593 &quot;totalUpdatedRows&quot;: 42, # The total number of rows where at least one cell in the row was updated.
594 &quot;totalUpdatedSheets&quot;: 42, # The total number of sheets where at least one cell in the sheet was updated.
595}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596</div>
597
598<div class="method">
599 <code class="details" id="clear">clear(spreadsheetId, range, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700600 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700601
602Args:
603 spreadsheetId: string, The ID of the spreadsheet to update. (required)
604 range: string, The A1 notation of the values to clear. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700605 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700606 The object takes the form of:
607
608{ # The request for clearing a range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800609}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700610
611 x__xgafv: string, V1 error format.
612 Allowed values
613 1 - v1 error format
614 2 - v2 error format
615
616Returns:
617 An object of the form:
618
619 { # The response when clearing a range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800620 &quot;clearedRange&quot;: &quot;A String&quot;, # 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&#x27;s limits.)
621 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
622}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700623</div>
624
625<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700626 <code class="details" id="close">close()</code>
627 <pre>Close httplib2 connections.</pre>
628</div>
629
630<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800631 <code class="details" id="get">get(spreadsheetId, range, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700632 <pre>Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700633
634Args:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700635 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700636 range: string, The A1 notation of the values to retrieve. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700637 dateTimeRenderOption: string, How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
638 Allowed values
639 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in &quot;serial number&quot; format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it&#x27;s 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.
640 FORMATTED_STRING - Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800641 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` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
642 Allowed values
643 DIMENSION_UNSPECIFIED - The default value, do not use.
644 ROWS - Operates on the rows of a sheet.
645 COLUMNS - Operates on the columns of a sheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800646 valueRenderOption: string, How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800647 Allowed values
648 FORMATTED_VALUE - Values will be calculated &amp; formatted in the reply according to the cell&#x27;s formatting. Formatting is based on the spreadsheet&#x27;s locale, not the requesting user&#x27;s locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `&quot;$1.23&quot;`.
649 UNFORMATTED_VALUE - Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.
650 FORMULA - Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `&quot;=A1&quot;`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700651 x__xgafv: string, V1 error format.
652 Allowed values
653 1 - v1 error format
654 2 - v2 error format
655
656Returns:
657 An object of the form:
658
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800659 { # Data within a range of the spreadsheet.
660 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
661 &quot;range&quot;: &quot;A String&quot;, # 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.
662 &quot;values&quot;: [ # 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.
663 [
664 &quot;&quot;,
665 ],
666 ],
667}</pre>
668</div>
669
670<div class="method">
671 <code class="details" id="update">update(spreadsheetId, range, body=None, includeValuesInResponse=None, responseDateTimeRenderOption=None, responseValueRenderOption=None, valueInputOption=None, x__xgafv=None)</code>
672 <pre>Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.
673
674Args:
675 spreadsheetId: string, The ID of the spreadsheet to update. (required)
676 range: string, The A1 notation of the values to update. (required)
677 body: object, The request body.
678 The object takes the form of:
679
680{ # Data within a range of the spreadsheet.
681 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
682 &quot;range&quot;: &quot;A String&quot;, # 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.
683 &quot;values&quot;: [ # 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.
684 [
685 &quot;&quot;,
686 ],
687 ],
688}
689
690 includeValuesInResponse: boolean, Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).
691 responseDateTimeRenderOption: string, Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is DateTimeRenderOption.SERIAL_NUMBER.
692 Allowed values
693 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in &quot;serial number&quot; format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it&#x27;s 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.
694 FORMATTED_STRING - Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale).
695 responseValueRenderOption: string, Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE.
696 Allowed values
697 FORMATTED_VALUE - Values will be calculated &amp; formatted in the reply according to the cell&#x27;s formatting. Formatting is based on the spreadsheet&#x27;s locale, not the requesting user&#x27;s locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `&quot;$1.23&quot;`.
698 UNFORMATTED_VALUE - Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.
699 FORMULA - Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `&quot;=A1&quot;`.
700 valueInputOption: string, How the input data should be interpreted.
701 Allowed values
702 INPUT_VALUE_OPTION_UNSPECIFIED - Default input value. This value must not be used.
703 RAW - The values the user has entered will not be parsed and will be stored as-is.
704 USER_ENTERED - The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI.
705 x__xgafv: string, V1 error format.
706 Allowed values
707 1 - v1 error format
708 2 - v2 error format
709
710Returns:
711 An object of the form:
712
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700713 { # The response when updating a range of values in a spreadsheet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800714 &quot;spreadsheetId&quot;: &quot;A String&quot;, # The spreadsheet the updates were applied to.
715 &quot;updatedCells&quot;: 42, # The number of cells updated.
716 &quot;updatedColumns&quot;: 42, # The number of columns where at least one cell in the column was updated.
717 &quot;updatedData&quot;: { # Data within a range of the spreadsheet. # The values of the cells after updates were applied. This is only included if the request&#x27;s `includeValuesInResponse` field was `true`.
718 &quot;majorDimension&quot;: &quot;A String&quot;, # 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.
719 &quot;range&quot;: &quot;A String&quot;, # 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.
720 &quot;values&quot;: [ # 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.
721 [
722 &quot;&quot;,
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800723 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800724 ],
725 },
726 &quot;updatedRange&quot;: &quot;A String&quot;, # The range (in A1 notation) that updates were applied to.
727 &quot;updatedRows&quot;: 42, # The number of rows where at least one cell in the row was updated.
728}</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700729</div>
730
731</body></html>