1<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"> 78 <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> 79<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> 80<p class="toc_element"> 81 <code><a href="#batchClear">batchClear(spreadsheetId, body=None, x__xgafv=None)</a></code></p> 82<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> 83<p class="toc_element"> 84 <code><a href="#batchClearByDataFilter">batchClearByDataFilter(spreadsheetId, body=None, x__xgafv=None)</a></code></p> 85<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> 86<p class="toc_element"> 87 <code><a href="#batchGet">batchGet(spreadsheetId, dateTimeRenderOption=None, majorDimension=None, ranges=None, valueRenderOption=None, x__xgafv=None)</a></code></p> 88<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> 89<p class="toc_element"> 90 <code><a href="#batchGetByDataFilter">batchGetByDataFilter(spreadsheetId, body=None, x__xgafv=None)</a></code></p> 91<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> 92<p class="toc_element"> 93 <code><a href="#batchUpdate">batchUpdate(spreadsheetId, body=None, x__xgafv=None)</a></code></p> 94<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> 95<p class="toc_element"> 96 <code><a href="#batchUpdateByDataFilter">batchUpdateByDataFilter(spreadsheetId, body=None, x__xgafv=None)</a></code></p> 97<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> 98<p class="toc_element"> 99 <code><a href="#clear">clear(spreadsheetId, range, body=None, x__xgafv=None)</a></code></p> 100<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> 101<p class="toc_element"> 102 <code><a href="#close">close()</a></code></p> 103<p class="firstline">Close httplib2 connections.</p> 104<p class="toc_element"> 105 <code><a href="#get">get(spreadsheetId, range, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=None, x__xgafv=None)</a></code></p> 106<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"> 108 <code><a href="#update">update(spreadsheetId, range, body=None, includeValuesInResponse=None, responseDateTimeRenderOption=None, responseValueRenderOption=None, valueInputOption=None, x__xgafv=None)</a></code></p> 109<p class="firstline">Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.</p> 110<h3>Method Details</h3> 111<div class="method"> 112 <code class="details" id="append">append(spreadsheetId, range, body=None, includeValuesInResponse=None, insertDataOption=None, responseDateTimeRenderOption=None, responseValueRenderOption=None, valueInputOption=None, x__xgafv=None)</code> 113 <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/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. 114 115Args: 116 spreadsheetId: string, The ID of the spreadsheet to update. (required) 117 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) 118 body: object, The request body. 119 The object takes the form of: 120 121{ # Data within a range of the spreadsheet. 122 "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. 123 "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. 124 "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. 125 [ 126 "", 127 ], 128 ], 129} 130 131 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. 132 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. 136 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 SERIAL_NUMBER. 137 Allowed values 138 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in "serial number" 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'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). 140 responseValueRenderOption: string, Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE. 141 Allowed values 142 FORMATTED_VALUE - Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `"$1.23"`. 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 `"=A1"`. 145 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. 150 x__xgafv: string, V1 error format. 151 Allowed values 152 1 - v1 error format 153 2 - v2 error format 154 155Returns: 156 An object of the form: 157 158 { # The response when updating a range of values in a spreadsheet. 159 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 160 "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. 161 "updates": { # The response when updating a range of values in a spreadsheet. # Information about the updates that were applied. 162 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 163 "updatedCells": 42, # The number of cells updated. 164 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated. 165 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`. 166 "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. 167 "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. 168 "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. 169 [ 170 "", 171 ], 172 ], 173 }, 174 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to. 175 "updatedRows": 42, # The number of rows where at least one cell in the row was updated. 176 }, 177}</pre> 178</div> 179 180<div class="method"> 181 <code class="details" id="batchClear">batchClear(spreadsheetId, body=None, x__xgafv=None)</code> 182 <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. 183 184Args: 185 spreadsheetId: string, The ID of the spreadsheet to update. (required) 186 body: object, The request body. 187 The object takes the form of: 188 189{ # The request for clearing more than one range of values in a spreadsheet. 190 "ranges": [ # The ranges to clear, in A1 or R1C1 notation. 191 "A String", 192 ], 193} 194 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 203 { # The response when clearing a range of values in a spreadsheet. 204 "clearedRanges": [ # 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's limits. 205 "A String", 206 ], 207 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 208}</pre> 209</div> 210 211<div class="method"> 212 <code class="details" id="batchClearByDataFilter">batchClearByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code> 213 <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. 214 215Args: 216 spreadsheetId: string, The ID of the spreadsheet to update. (required) 217 body: object, The request body. 218 The object takes the form of: 219 220{ # The request for clearing more than one range selected by a DataFilter in a spreadsheet. 221 "dataFilters": [ # The DataFilters used to determine which ranges to clear. 222 { # Filter that describes what data should be selected or returned from a request. 223 "a1Range": "A String", # Selects data that matches the specified A1 range. 224 "developerMetadataLookup": { # 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 "locationMatchingStrategy": "A String", # 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 "locationType": "A String", # 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 "metadataId": 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id. 228 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key. 229 "metadataLocation": { # 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 "dimensionRange": { # 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 "dimension": "A String", # The dimension of the span. 232 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded. 233 "sheetId": 42, # The sheet this span is on. 234 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded. 235 }, 236 "locationType": "A String", # The type of location this object represents. This field is read-only. 237 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet. 238 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet. 239 }, 240 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value. 241 "visibility": "A String", # 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. 242 }, 243 "gridRange": { # 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 `"Sheet1"` 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 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded. 245 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded. 246 "sheetId": 42, # The sheet this range is on. 247 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded. 248 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded. 249 }, 250 }, 251 ], 252} 253 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 262 { # The response when clearing a range of values selected with DataFilters in a spreadsheet. 263 "clearedRanges": [ # 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's limits. 264 "A String", 265 ], 266 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 267}</pre> 268</div> 269 270<div class="method"> 271 <code class="details" id="batchGet">batchGet(spreadsheetId, dateTimeRenderOption=None, majorDimension=None, ranges=None, valueRenderOption=None, x__xgafv=None)</code> 272 <pre>Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. 273 274Args: 275 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required) 276 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 SERIAL_NUMBER. 277 Allowed values 278 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in "serial number" 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'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). 280 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. 285 ranges: string, The A1 notation or R1C1 notation of the range to retrieve values from. (repeated) 286 valueRenderOption: string, How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE. 287 Allowed values 288 FORMATTED_VALUE - Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `"$1.23"`. 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 `"=A1"`. 291 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. 300 "spreadsheetId": "A String", # The ID of the spreadsheet the data was retrieved from. 301 "valueRanges": [ # 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 "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. 304 "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. 305 "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. 306 [ 307 "", 308 ], 309 ], 310 }, 311 ], 312}</pre> 313</div> 314 315<div class="method"> 316 <code class="details" id="batchGetByDataFilter">batchGetByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code> 317 <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. 318 319Args: 320 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required) 321 body: object, The request body. 322 The object takes the form of: 323 324{ # The request for retrieving a range of values in a spreadsheet selected by a set of DataFilters. 325 "dataFilters": [ # 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 "a1Range": "A String", # Selects data that matches the specified A1 range. 328 "developerMetadataLookup": { # 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 "locationMatchingStrategy": "A String", # 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 "locationType": "A String", # 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 "metadataId": 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id. 332 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key. 333 "metadataLocation": { # 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 "dimensionRange": { # 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 "dimension": "A String", # The dimension of the span. 336 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded. 337 "sheetId": 42, # The sheet this span is on. 338 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded. 339 }, 340 "locationType": "A String", # The type of location this object represents. This field is read-only. 341 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet. 342 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet. 343 }, 344 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value. 345 "visibility": "A String", # 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. 346 }, 347 "gridRange": { # 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 `"Sheet1"` 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 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded. 349 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded. 350 "sheetId": 42, # The sheet this range is on. 351 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded. 352 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded. 353 }, 354 }, 355 ], 356 "dateTimeRenderOption": "A 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 SERIAL_NUMBER. 357 "majorDimension": "A String", # 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 "valueRenderOption": "A String", # How values should be represented in the output. The default render option is FORMATTED_VALUE. 359} 360 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 369 { # The response when retrieving more than one range of values in a spreadsheet selected by DataFilters. 370 "spreadsheetId": "A String", # The ID of the spreadsheet the data was retrieved from. 371 "valueRanges": [ # 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 "dataFilters": [ # 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 "a1Range": "A String", # Selects data that matches the specified A1 range. 376 "developerMetadataLookup": { # 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 "locationMatchingStrategy": "A String", # 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 "locationType": "A String", # 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 "metadataId": 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id. 380 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key. 381 "metadataLocation": { # 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 "dimensionRange": { # 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 "dimension": "A String", # The dimension of the span. 384 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded. 385 "sheetId": 42, # The sheet this span is on. 386 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded. 387 }, 388 "locationType": "A String", # The type of location this object represents. This field is read-only. 389 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet. 390 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet. 391 }, 392 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value. 393 "visibility": "A String", # 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. 394 }, 395 "gridRange": { # 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 `"Sheet1"` 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 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded. 397 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded. 398 "sheetId": 42, # The sheet this range is on. 399 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded. 400 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded. 401 }, 402 }, 403 ], 404 "valueRange": { # Data within a range of the spreadsheet. # The values matched by the DataFilter. 405 "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. 406 "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. 407 "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. 408 [ 409 "", 410 ], 411 ], 412 }, 413 }, 414 ], 415}</pre> 416</div> 417 418<div class="method"> 419 <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body=None, x__xgafv=None)</code> 420 <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. 421 422Args: 423 spreadsheetId: string, The ID of the spreadsheet to update. (required) 424 body: object, The request body. 425 The object takes the form of: 426 427{ # The request for updating more than one range of values in a spreadsheet. 428 "data": [ # The new values to apply to the spreadsheet. 429 { # Data within a range of the spreadsheet. 430 "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. 431 "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. 432 "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. 433 [ 434 "", 435 ], 436 ], 437 }, 438 ], 439 "includeValuesInResponse": 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 "responseDateTimeRenderOption": "A 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 SERIAL_NUMBER. 441 "responseValueRenderOption": "A String", # Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE. 442 "valueInputOption": "A String", # How the input data should be interpreted. 443} 444 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. 454 "responses": [ # 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 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 457 "updatedCells": 42, # The number of cells updated. 458 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated. 459 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`. 460 "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. 461 "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. 462 "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. 463 [ 464 "", 465 ], 466 ], 467 }, 468 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to. 469 "updatedRows": 42, # The number of rows where at least one cell in the row was updated. 470 }, 471 ], 472 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 473 "totalUpdatedCells": 42, # The total number of cells updated. 474 "totalUpdatedColumns": 42, # The total number of columns where at least one cell in the column was updated. 475 "totalUpdatedRows": 42, # The total number of rows where at least one cell in the row was updated. 476 "totalUpdatedSheets": 42, # The total number of sheets where at least one cell in the sheet was updated. 477}</pre> 478</div> 479 480<div class="method"> 481 <code class="details" id="batchUpdateByDataFilter">batchUpdateByDataFilter(spreadsheetId, body=None, x__xgafv=None)</code> 482 <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. 483 484Args: 485 spreadsheetId: string, The ID of the spreadsheet to update. (required) 486 body: object, The request body. 487 The object takes the form of: 488 489{ # The request for updating more than one range of values in a spreadsheet. 490 "data": [ # 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 "dataFilter": { # 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 "a1Range": "A String", # Selects data that matches the specified A1 range. 494 "developerMetadataLookup": { # 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 "locationMatchingStrategy": "A String", # 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 "locationType": "A String", # 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 "metadataId": 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id. 498 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key. 499 "metadataLocation": { # 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 "dimensionRange": { # 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 "dimension": "A String", # The dimension of the span. 502 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded. 503 "sheetId": 42, # The sheet this span is on. 504 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded. 505 }, 506 "locationType": "A String", # The type of location this object represents. This field is read-only. 507 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet. 508 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet. 509 }, 510 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value. 511 "visibility": "A String", # 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 "gridRange": { # 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 `"Sheet1"` 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 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded. 515 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded. 516 "sheetId": 42, # The sheet this range is on. 517 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded. 518 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded. 519 }, 520 }, 521 "majorDimension": "A String", # The major dimension of the values. 522 "values": [ # 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 "", 525 ], 526 ], 527 }, 528 ], 529 "includeValuesInResponse": 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 "responseDateTimeRenderOption": "A 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 SERIAL_NUMBER. 531 "responseValueRenderOption": "A String", # Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE. 532 "valueInputOption": "A String", # How the input data should be interpreted. 533} 534 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. 544 "responses": [ # The response for each range updated. 545 { # The response when updating a range of values by a data filter in a spreadsheet. 546 "dataFilter": { # Filter that describes what data should be selected or returned from a request. # The data filter that selected the range that was updated. 547 "a1Range": "A String", # Selects data that matches the specified A1 range. 548 "developerMetadataLookup": { # 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 "locationMatchingStrategy": "A String", # 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 "locationType": "A String", # 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 "metadataId": 42, # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id. 552 "metadataKey": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key. 553 "metadataLocation": { # 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 "dimensionRange": { # 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 "dimension": "A String", # The dimension of the span. 556 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded. 557 "sheetId": 42, # The sheet this span is on. 558 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded. 559 }, 560 "locationType": "A String", # The type of location this object represents. This field is read-only. 561 "sheetId": 42, # The ID of the sheet when metadata is associated with an entire sheet. 562 "spreadsheet": True or False, # True when metadata is associated with an entire spreadsheet. 563 }, 564 "metadataValue": "A String", # Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value. 565 "visibility": "A String", # 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. 566 }, 567 "gridRange": { # 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 `"Sheet1"` 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 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded. 569 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded. 570 "sheetId": 42, # The sheet this range is on. 571 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded. 572 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded. 573 }, 574 }, 575 "updatedCells": 42, # The number of cells updated. 576 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated. 577 "updatedData": { # 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's `includeValuesInResponse` field was `true`. 578 "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. 579 "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. 580 "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. 581 [ 582 "", 583 ], 584 ], 585 }, 586 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to. 587 "updatedRows": 42, # The number of rows where at least one cell in the row was updated. 588 }, 589 ], 590 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 591 "totalUpdatedCells": 42, # The total number of cells updated. 592 "totalUpdatedColumns": 42, # The total number of columns where at least one cell in the column was updated. 593 "totalUpdatedRows": 42, # The total number of rows where at least one cell in the row was updated. 594 "totalUpdatedSheets": 42, # The total number of sheets where at least one cell in the sheet was updated. 595}</pre> 596</div> 597 598<div class="method"> 599 <code class="details" id="clear">clear(spreadsheetId, range, body=None, x__xgafv=None)</code> 600 <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. 601 602Args: 603 spreadsheetId: string, The ID of the spreadsheet to update. (required) 604 range: string, The A1 notation or R1C1 notation of the values to clear. (required) 605 body: object, The request body. 606 The object takes the form of: 607 608{ # The request for clearing a range of values in a spreadsheet. 609} 610 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. 620 "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.) 621 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 622}</pre> 623</div> 624 625<div class="method"> 626 <code class="details" id="close">close()</code> 627 <pre>Close httplib2 connections.</pre> 628</div> 629 630<div class="method"> 631 <code class="details" id="get">get(spreadsheetId, range, dateTimeRenderOption=None, majorDimension=None, valueRenderOption=None, x__xgafv=None)</code> 632 <pre>Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range. 633 634Args: 635 spreadsheetId: string, The ID of the spreadsheet to retrieve data from. (required) 636 range: string, The A1 notation or R1C1 notation of the range to retrieve values from. (required) 637 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 SERIAL_NUMBER. 638 Allowed values 639 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in "serial number" 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'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). 641 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. 646 valueRenderOption: string, How values should be represented in the output. The default render option is FORMATTED_VALUE. 647 Allowed values 648 FORMATTED_VALUE - Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `"$1.23"`. 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 `"=A1"`. 651 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 659 { # Data within a range of the spreadsheet. 660 "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. 661 "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. 662 "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. 663 [ 664 "", 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 "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. 682 "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. 683 "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. 684 [ 685 "", 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 SERIAL_NUMBER. 692 Allowed values 693 SERIAL_NUMBER - Instructs date, time, datetime, and duration fields to be output as doubles in "serial number" 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'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 FORMATTED_VALUE. 696 Allowed values 697 FORMATTED_VALUE - Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `"$1.23"`. 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 `"=A1"`. 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 713 { # The response when updating a range of values in a spreadsheet. 714 "spreadsheetId": "A String", # The spreadsheet the updates were applied to. 715 "updatedCells": 42, # The number of cells updated. 716 "updatedColumns": 42, # The number of columns where at least one cell in the column was updated. 717 "updatedData": { # Data within a range of the spreadsheet. # The values of the cells after updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`. 718 "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. 719 "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. 720 "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. 721 [ 722 "", 723 ], 724 ], 725 }, 726 "updatedRange": "A String", # The range (in A1 notation) that updates were applied to. 727 "updatedRows": 42, # The number of rows where at least one cell in the row was updated. 728}</pre> 729</div> 730 731</body></html>