class SpreadsheetsValues extends Resource (View source)

The "values" collection of methods.

Typical usage is:

 $sheetsService = new Google\Service\Sheets(...);
 $values = $sheetsService->spreadsheets_values;

Methods

append(string $spreadsheetId, string $range, ValueRange $postBody, array $optParams = [])

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.

batchClear(string $spreadsheetId, BatchClearValuesRequest $postBody, array $optParams = [])

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 and data validation) are kept. (values.batchClear)

batchClearByDataFilter(string $spreadsheetId, BatchClearValuesByDataFilterRequest $postBody, array $optParams = [])

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. (values.batchClearByDataFilter)

batchGet(string $spreadsheetId, array $optParams = [])

Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. (values.batchGet)

batchGetByDataFilter(string $spreadsheetId, BatchGetValuesByDataFilterRequest $postBody, array $optParams = [])

Returns one or more ranges of values that match the specified data filters.

batchUpdate(string $spreadsheetId, BatchUpdateValuesRequest $postBody, array $optParams = [])

Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.

batchUpdateByDataFilter(string $spreadsheetId, BatchUpdateValuesByDataFilterRequest $postBody, array $optParams = [])

Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges. (values.batchUpdateByDataFilter)

clear(string $spreadsheetId, string $range, ClearValuesRequest $postBody, array $optParams = [])

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. (values.clear)

get(string $spreadsheetId, string $range, array $optParams = [])

Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range. (values.get)

update(string $spreadsheetId, string $range, ValueRange $postBody, array $optParams = [])

Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption. (values.update)

Details

AppendValuesResponse append(string $spreadsheetId, string $range, ValueRange $postBody, array $optParams = [])

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 and sample code 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. (values.append)

Parameters

string $spreadsheetId

The ID of the spreadsheet to update.

string $range

The A1 notation of a range to search for a logical table of data. Values are appended after the last row of the table.

ValueRange $postBody
array $optParams

Optional parameters.

Return Value

AppendValuesResponse

Exceptions

Exception

BatchClearValuesResponse batchClear(string $spreadsheetId, BatchClearValuesRequest $postBody, array $optParams = [])

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 and data validation) are kept. (values.batchClear)

Parameters

string $spreadsheetId

The ID of the spreadsheet to update.

BatchClearValuesRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchClearValuesResponse

Exceptions

Exception

BatchClearValuesByDataFilterResponse batchClearByDataFilter(string $spreadsheetId, BatchClearValuesByDataFilterRequest $postBody, array $optParams = [])

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. (values.batchClearByDataFilter)

Parameters

string $spreadsheetId

The ID of the spreadsheet to update.

BatchClearValuesByDataFilterRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchClearValuesByDataFilterResponse

Exceptions

Exception

BatchGetValuesResponse batchGet(string $spreadsheetId, array $optParams = [])

Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. (values.batchGet)

Parameters

string $spreadsheetId

The ID of the spreadsheet to retrieve data from.

array $optParams

Optional parameters.

Return Value

BatchGetValuesResponse

Exceptions

Exception

BatchGetValuesByDataFilterResponse batchGetByDataFilter(string $spreadsheetId, BatchGetValuesByDataFilterRequest $postBody, array $optParams = [])

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. (values.batchGetByDataFilter)

Parameters

string $spreadsheetId

The ID of the spreadsheet to retrieve data from.

BatchGetValuesByDataFilterRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchGetValuesByDataFilterResponse

Exceptions

Exception

BatchUpdateValuesResponse batchUpdate(string $spreadsheetId, BatchUpdateValuesRequest $postBody, array $optParams = [])

Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.

(values.batchUpdate)

Parameters

string $spreadsheetId

The ID of the spreadsheet to update.

BatchUpdateValuesRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchUpdateValuesResponse

Exceptions

Exception

BatchUpdateValuesByDataFilterResponse batchUpdateByDataFilter(string $spreadsheetId, BatchUpdateValuesByDataFilterRequest $postBody, array $optParams = [])

Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges. (values.batchUpdateByDataFilter)

Parameters

string $spreadsheetId

The ID of the spreadsheet to update.

BatchUpdateValuesByDataFilterRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchUpdateValuesByDataFilterResponse

Exceptions

Exception

ClearValuesResponse clear(string $spreadsheetId, string $range, ClearValuesRequest $postBody, array $optParams = [])

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. (values.clear)

Parameters

string $spreadsheetId

The ID of the spreadsheet to update.

string $range

The A1 notation or R1C1 notation of the values to clear.

ClearValuesRequest $postBody
array $optParams

Optional parameters.

Return Value

ClearValuesResponse

Exceptions

Exception

ValueRange get(string $spreadsheetId, string $range, array $optParams = [])

Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range. (values.get)

Parameters

string $spreadsheetId

The ID of the spreadsheet to retrieve data from.

string $range

The A1 notation or R1C1 notation of the range to retrieve values from.

array $optParams

Optional parameters.

Return Value

ValueRange

Exceptions

Exception

UpdateValuesResponse update(string $spreadsheetId, string $range, ValueRange $postBody, array $optParams = [])

Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption. (values.update)

Parameters

string $spreadsheetId

The ID of the spreadsheet to update.

string $range

The A1 notation of the values to update.

ValueRange $postBody
array $optParams

Optional parameters.

Return Value

UpdateValuesResponse

Exceptions

Exception