Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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="#batchGet">batchGet(spreadsheetId, valueRenderOption=None, majorDimension=None, ranges=None, dateTimeRenderOption=None, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Returns one or more ranges of values from a spreadsheet.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Sets values in a range of a spreadsheet.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(spreadsheetId, range, valueRenderOption=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Returns a range of values from a spreadsheet.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#update">update(spreadsheetId, range, body, valueInputOption=None, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Sets values in a range of a spreadsheet.</p> |
| 89 | <h3>Method Details</h3> |
| 90 | <div class="method"> |
| 91 | <code class="details" id="batchGet">batchGet(spreadsheetId, valueRenderOption=None, majorDimension=None, ranges=None, dateTimeRenderOption=None, x__xgafv=None)</code> |
| 92 | <pre>Returns one or more ranges of values from a spreadsheet. |
| 93 | The caller must specify the spreadsheet ID and one or more ranges. |
| 94 | |
| 95 | Args: |
| 96 | spreadsheetId: string, The id of the spreadsheet to retrieve data from. (required) |
| 97 | valueRenderOption: string, How values should be represented in the output. |
| 98 | majorDimension: string, The major dimension that results should use. |
| 99 | |
| 100 | For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, |
| 101 | then requesting `range=A1:B2,majorDimension=ROWS` will return |
| 102 | `[[1,2],[3,4]]`, |
| 103 | whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return |
| 104 | `[[1,3],[2,4]]`. |
| 105 | ranges: string, The A1 notation of the values to retrieve. (repeated) |
| 106 | dateTimeRenderOption: string, How dates, times, and durations should be represented in the output. |
| 107 | This is ignored if ValueRenderOption option is |
| 108 | FORMATTED_VALUE. |
| 109 | x__xgafv: string, V1 error format. |
| 110 | Allowed values |
| 111 | 1 - v1 error format |
| 112 | 2 - v2 error format |
| 113 | |
| 114 | Returns: |
| 115 | An object of the form: |
| 116 | |
| 117 | { # The response when retrieving more than one range of values in a spreadsheet. |
| 118 | "spreadsheetId": "A String", # The id of the spreadsheet to retrieve data from. |
| 119 | "valueRanges": [ # The requested values. The order of the ValueRanges is the same as the |
| 120 | # order of the requested ranges. |
| 121 | { # Data within a range of the spreadsheet. |
| 122 | "range": "A String", # The range the values cover, in A1 notation. |
| 123 | # For output, this range indicates the entire requested range, |
| 124 | # even though the values will exclude trailing rows and columns. |
| 125 | "values": [ # The data that was read or to be written. This is an array of arrays, |
| 126 | # the outer array representing all the data and each inner array |
| 127 | # representing a major dimension. Each item in the inner array |
| 128 | # corresponds with one cell. |
| 129 | # |
| 130 | # For output, empty trailing rows and columns will not be included. |
| 131 | # |
| 132 | # For input, supported value types are: bool, string, and double. |
| 133 | # Null and empty values will be skipped. |
| 134 | # To set a cell to an empty value, set the string value to an empty string. |
| 135 | [ |
| 136 | "", |
| 137 | ], |
| 138 | ], |
| 139 | "majorDimension": "A String", # The major dimension of the values. |
| 140 | # |
| 141 | # For output, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4, |
| 142 | # then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]], |
| 143 | # whereas requesting range=A1:B2,majorDimension=COLUMNS will return |
| 144 | # [[1,3],[2,4]]. |
| 145 | # |
| 146 | # For input, with range=A1:B2,majorDimension=ROWS then [[1,2],[3,4]] |
| 147 | # will set A1=1,B1=2,A2=3,B2=4. With range=A1:B2,majorDimension=COLUMNS |
| 148 | # then [[1,2],[3,4]] will set A1=1,B1=3,A2=2,B2=4. |
| 149 | # |
| 150 | # When writing, if this field is not set, it defaults to ROWS. |
| 151 | }, |
| 152 | ], |
| 153 | }</pre> |
| 154 | </div> |
| 155 | |
| 156 | <div class="method"> |
| 157 | <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</code> |
| 158 | <pre>Sets values in a range of a spreadsheet. |
| 159 | The caller must specify the spreadsheet ID, |
| 160 | a valueInputOption, and one or more |
| 161 | ValueRanges. |
| 162 | |
| 163 | Args: |
| 164 | spreadsheetId: string, The id of the spreadsheet to update. (required) |
| 165 | body: object, The request body. (required) |
| 166 | The object takes the form of: |
| 167 | |
| 168 | { # The request for updating more than one range of values in a spreadsheet. |
| 169 | "data": [ # The new values to apply to the spreadsheet. |
| 170 | { # Data within a range of the spreadsheet. |
| 171 | "range": "A String", # The range the values cover, in A1 notation. |
| 172 | # For output, this range indicates the entire requested range, |
| 173 | # even though the values will exclude trailing rows and columns. |
| 174 | "values": [ # The data that was read or to be written. This is an array of arrays, |
| 175 | # the outer array representing all the data and each inner array |
| 176 | # representing a major dimension. Each item in the inner array |
| 177 | # corresponds with one cell. |
| 178 | # |
| 179 | # For output, empty trailing rows and columns will not be included. |
| 180 | # |
| 181 | # For input, supported value types are: bool, string, and double. |
| 182 | # Null and empty values will be skipped. |
| 183 | # To set a cell to an empty value, set the string value to an empty string. |
| 184 | [ |
| 185 | "", |
| 186 | ], |
| 187 | ], |
| 188 | "majorDimension": "A String", # The major dimension of the values. |
| 189 | # |
| 190 | # For output, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4, |
| 191 | # then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]], |
| 192 | # whereas requesting range=A1:B2,majorDimension=COLUMNS will return |
| 193 | # [[1,3],[2,4]]. |
| 194 | # |
| 195 | # For input, with range=A1:B2,majorDimension=ROWS then [[1,2],[3,4]] |
| 196 | # will set A1=1,B1=2,A2=3,B2=4. With range=A1:B2,majorDimension=COLUMNS |
| 197 | # then [[1,2],[3,4]] will set A1=1,B1=3,A2=2,B2=4. |
| 198 | # |
| 199 | # When writing, if this field is not set, it defaults to ROWS. |
| 200 | }, |
| 201 | ], |
| 202 | "valueInputOption": "A String", # How the input data should be interpreted. |
| 203 | } |
| 204 | |
| 205 | x__xgafv: string, V1 error format. |
| 206 | Allowed values |
| 207 | 1 - v1 error format |
| 208 | 2 - v2 error format |
| 209 | |
| 210 | Returns: |
| 211 | An object of the form: |
| 212 | |
| 213 | { # The response when updating a range of values in a spreadsheet. |
| 214 | "responses": [ # One UpdateValuesResponse per requested range, in the same order as |
| 215 | # the requests appeared. |
| 216 | { # The response when updating a range of values in a spreadsheet. |
| 217 | "updatedRange": "A String", # The range (in A1 notation) that updates were applied to. |
| 218 | "updatedColumns": 42, # The number of columns where at least one cell in the column was updated. |
| 219 | "updatedCells": 42, # The number of cells updated. |
| 220 | "updatedRows": 42, # The number of rows where at least one cell in the row was updated. |
| 221 | "spreadsheetId": "A String", # The spreadsheet the updates were applied to. |
| 222 | }, |
| 223 | ], |
| 224 | "totalUpdatedCells": 42, # The total number of cells updated. |
| 225 | "totalUpdatedColumns": 42, # The total number of columns where at least one cell in the column was |
| 226 | # updated. |
| 227 | "totalUpdatedRows": 42, # The total number of rows where at least one cell in the row was updated. |
| 228 | "spreadsheetId": "A String", # The spreadsheet the updates were applied to. |
| 229 | "totalUpdatedSheets": 42, # The total number of sheets where at least one cell in the sheet was |
| 230 | # updated. |
| 231 | }</pre> |
| 232 | </div> |
| 233 | |
| 234 | <div class="method"> |
| 235 | <code class="details" id="get">get(spreadsheetId, range, valueRenderOption=None, majorDimension=None, dateTimeRenderOption=None, x__xgafv=None)</code> |
| 236 | <pre>Returns a range of values from a spreadsheet. |
| 237 | The caller must specify the spreadsheet ID and a range. |
| 238 | |
| 239 | Args: |
| 240 | spreadsheetId: string, The id of the spreadsheet to retrieve data from. (required) |
| 241 | range: string, The A1 notation of the values to retrieve. (required) |
| 242 | valueRenderOption: string, How values should be represented in the output. |
| 243 | majorDimension: string, The major dimension that results should use. |
| 244 | |
| 245 | For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, |
| 246 | then requesting `range=A1:B2,majorDimension=ROWS` will return |
| 247 | `[[1,2],[3,4]]`, |
| 248 | whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return |
| 249 | `[[1,3],[2,4]]`. |
| 250 | dateTimeRenderOption: string, How dates, times, and durations should be represented in the output. |
| 251 | This is ignored if the ValueRenderOption option is |
| 252 | FORMATTED_VALUE. |
| 253 | x__xgafv: string, V1 error format. |
| 254 | Allowed values |
| 255 | 1 - v1 error format |
| 256 | 2 - v2 error format |
| 257 | |
| 258 | Returns: |
| 259 | An object of the form: |
| 260 | |
| 261 | { # Data within a range of the spreadsheet. |
| 262 | "range": "A String", # The range the values cover, in A1 notation. |
| 263 | # For output, this range indicates the entire requested range, |
| 264 | # even though the values will exclude trailing rows and columns. |
| 265 | "values": [ # The data that was read or to be written. This is an array of arrays, |
| 266 | # the outer array representing all the data and each inner array |
| 267 | # representing a major dimension. Each item in the inner array |
| 268 | # corresponds with one cell. |
| 269 | # |
| 270 | # For output, empty trailing rows and columns will not be included. |
| 271 | # |
| 272 | # For input, supported value types are: bool, string, and double. |
| 273 | # Null and empty values will be skipped. |
| 274 | # To set a cell to an empty value, set the string value to an empty string. |
| 275 | [ |
| 276 | "", |
| 277 | ], |
| 278 | ], |
| 279 | "majorDimension": "A String", # The major dimension of the values. |
| 280 | # |
| 281 | # For output, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4, |
| 282 | # then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]], |
| 283 | # whereas requesting range=A1:B2,majorDimension=COLUMNS will return |
| 284 | # [[1,3],[2,4]]. |
| 285 | # |
| 286 | # For input, with range=A1:B2,majorDimension=ROWS then [[1,2],[3,4]] |
| 287 | # will set A1=1,B1=2,A2=3,B2=4. With range=A1:B2,majorDimension=COLUMNS |
| 288 | # then [[1,2],[3,4]] will set A1=1,B1=3,A2=2,B2=4. |
| 289 | # |
| 290 | # When writing, if this field is not set, it defaults to ROWS. |
| 291 | }</pre> |
| 292 | </div> |
| 293 | |
| 294 | <div class="method"> |
| 295 | <code class="details" id="update">update(spreadsheetId, range, body, valueInputOption=None, x__xgafv=None)</code> |
| 296 | <pre>Sets values in a range of a spreadsheet. |
| 297 | The caller must specify the spreadsheet ID, range, and |
| 298 | a valueInputOption. |
| 299 | |
| 300 | Args: |
| 301 | spreadsheetId: string, The id of the spreadsheet to update. (required) |
| 302 | range: string, The A1 notation of the values to update. (required) |
| 303 | body: object, The request body. (required) |
| 304 | The object takes the form of: |
| 305 | |
| 306 | { # Data within a range of the spreadsheet. |
| 307 | "range": "A String", # The range the values cover, in A1 notation. |
| 308 | # For output, this range indicates the entire requested range, |
| 309 | # even though the values will exclude trailing rows and columns. |
| 310 | "values": [ # The data that was read or to be written. This is an array of arrays, |
| 311 | # the outer array representing all the data and each inner array |
| 312 | # representing a major dimension. Each item in the inner array |
| 313 | # corresponds with one cell. |
| 314 | # |
| 315 | # For output, empty trailing rows and columns will not be included. |
| 316 | # |
| 317 | # For input, supported value types are: bool, string, and double. |
| 318 | # Null and empty values will be skipped. |
| 319 | # To set a cell to an empty value, set the string value to an empty string. |
| 320 | [ |
| 321 | "", |
| 322 | ], |
| 323 | ], |
| 324 | "majorDimension": "A String", # The major dimension of the values. |
| 325 | # |
| 326 | # For output, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4, |
| 327 | # then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]], |
| 328 | # whereas requesting range=A1:B2,majorDimension=COLUMNS will return |
| 329 | # [[1,3],[2,4]]. |
| 330 | # |
| 331 | # For input, with range=A1:B2,majorDimension=ROWS then [[1,2],[3,4]] |
| 332 | # will set A1=1,B1=2,A2=3,B2=4. With range=A1:B2,majorDimension=COLUMNS |
| 333 | # then [[1,2],[3,4]] will set A1=1,B1=3,A2=2,B2=4. |
| 334 | # |
| 335 | # When writing, if this field is not set, it defaults to ROWS. |
| 336 | } |
| 337 | |
| 338 | valueInputOption: string, How the input data should be interpreted. |
| 339 | x__xgafv: string, V1 error format. |
| 340 | Allowed values |
| 341 | 1 - v1 error format |
| 342 | 2 - v2 error format |
| 343 | |
| 344 | Returns: |
| 345 | An object of the form: |
| 346 | |
| 347 | { # The response when updating a range of values in a spreadsheet. |
| 348 | "updatedRange": "A String", # The range (in A1 notation) that updates were applied to. |
| 349 | "updatedColumns": 42, # The number of columns where at least one cell in the column was updated. |
| 350 | "updatedCells": 42, # The number of cells updated. |
| 351 | "updatedRows": 42, # The number of rows where at least one cell in the row was updated. |
| 352 | "spreadsheetId": "A String", # The spreadsheet the updates were applied to. |
| 353 | }</pre> |
| 354 | </div> |
| 355 | |
| 356 | </body></html> |