REST Resource: spreadsheets.values
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Risorsa: ValueRange
Dati all'interno di un intervallo del foglio di lavoro.
Rappresentazione JSON |
{
"range": string,
"majorDimension": enum (Dimension ),
"values": [
array
]
} |
Campi |
range |
string
L'intervallo coperto dai valori, in notazione A1. Per l'output, questo intervallo indica l'intero intervallo richiesto, anche se i valori escluderanno le righe e le colonne finali. Quando aggiungi i valori, questo campo rappresenta l'intervallo in cui cercare una tabella, dopodiché i valori verranno aggiunti.
|
majorDimension |
enum (Dimension )
La dimensione principale dei valori. Per l'output, se i dati del foglio di lavoro sono: A1=1,B1=2,A2=3,B2=4 , la richiesta di range=A1:B2,majorDimension=ROWS restituirà [[1,2],[3,4]] , mentre la richiesta di range=A1:B2,majorDimension=COLUMNS restituirà [[1,3],[2,4]] . Per l'input, range=A1:B2,majorDimension=ROWS e poi [[1,2],[3,4]] imposteranno A1=1,B1=2,A2=3,B2=4 . Con range=A1:B2,majorDimension=COLUMNS , [[1,2],[3,4]] imposterà A1=1,B1=3,A2=2,B2=4 . Se questo campo non viene impostato durante la scrittura, per impostazione predefinita viene utilizzato RIGHE.
|
values[] |
array (ListValue format)
I dati che sono stati letti o che devono essere scritti. Si tratta di un array di array, in cui l'array esterno rappresenta tutti i dati e ogni array interno rappresenta una dimensione principale. Ogni elemento dell'array interno corrisponde a una cella. Per l'output, le righe e le colonne finali vuote non verranno incluse. Per l'input, i tipi di valore supportati sono: bool, string e double. I valori null verranno ignorati. Per impostare una cella su un valore vuoto, imposta il valore della stringa su una stringa vuota.
|
Metodi |
|
Aggiunge valori a un foglio di lavoro. |
|
Cancella uno o più intervalli di valori da un foglio di lavoro. |
|
Cancella uno o più intervalli di valori da un foglio di lavoro. |
|
Restituisce uno o più intervalli di valori da un foglio di lavoro. |
|
Restituisce uno o più intervalli di valori corrispondenti ai filtri dati specificati. |
|
Imposta i valori in uno o più intervalli di un foglio di lavoro. |
|
Imposta i valori in uno o più intervalli di un foglio di lavoro. |
|
Cancella i valori da un foglio di lavoro. |
|
Restituisce un intervallo di valori da un foglio di lavoro. |
|
Imposta i valori in un intervallo di un foglio di lavoro. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-03-22 UTC.
[null,null,["Ultimo aggiornamento 2025-03-22 UTC."],[],[],null,["# REST Resource: spreadsheets.values\n\n- [Resource: ValueRange](#ValueRange)\n - [JSON representation](#ValueRange.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: ValueRange\n--------------------\n\nData within a range of the spreadsheet.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"range\": string, \"majorDimension\": enum (/workspace/sheets/api/reference/rest/v4/Dimension), \"values\": [ array ] } ``` |\n\n| Fields ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `range` | `string` The range the values cover, in [A1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell). 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. |\n| `majorDimension` | `enum (`[Dimension](/workspace/sheets/api/reference/rest/v4/Dimension)`)` 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. |\n| `values[]` | `array (`[ListValue](https://protobuf.dev/reference/protobuf/google.protobuf/#list-value)` format)` 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. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|\n| ### [append](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/append) | Appends values to a spreadsheet. |\n| ### [batchClear](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClear) | Clears one or more ranges of values from a spreadsheet. |\n| ### [batchClearByDataFilter](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClearByDataFilter) | Clears one or more ranges of values from a spreadsheet. |\n| ### [batchGet](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGet) | Returns one or more ranges of values from a spreadsheet. |\n| ### [batchGetByDataFilter](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGetByDataFilter) | Returns one or more ranges of values that match the specified data filters. |\n| ### [batchUpdate](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate) | Sets values in one or more ranges of a spreadsheet. |\n| ### [batchUpdateByDataFilter](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdateByDataFilter) | Sets values in one or more ranges of a spreadsheet. |\n| ### [clear](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/clear) | Clears values from a spreadsheet. |\n| ### [get](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get) | Returns a range of values from a spreadsheet. |\n| ### [update](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update) | Sets values in a range of a spreadsheet. |"]]