Documentation

Google_Service_Sheets_Resource_SpreadsheetsValues extends Google_Service_Resource
in package

The "values" collection of methods.

Typical usage is: $sheetsService = new Google_Service_Sheets(...); $values = $sheetsService->values;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
append()  : Google_Service_Sheets_AppendValuesResponse
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()  : Google_Service_Sheets_BatchClearValuesResponse
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. (values.batchClear)
batchClearByDataFilter()  : Google_Service_Sheets_BatchClearValuesByDataFilterResponse
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()  : Google_Service_Sheets_BatchGetValuesResponse
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()  : Google_Service_Sheets_BatchGetValuesByDataFilterResponse
Returns one or more ranges of values that match the specified data filters.
batchUpdate()  : Google_Service_Sheets_BatchUpdateValuesResponse
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()  : Google_Service_Sheets_BatchUpdateValuesByDataFilterResponse
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)
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
clear()  : Google_Service_Sheets_ClearValuesResponse
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)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
get()  : Google_Service_Sheets_ValueRange
Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range. (values.get)
update()  : Google_Service_Sheets_UpdateValuesResponse
Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption. (values.update)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

append()

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.

public append(string $spreadsheetId, string $range, Google_Service_Sheets_ValueRange $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_AppendValuesResponse

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
$spreadsheetId : string

The ID of the spreadsheet to update.

$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.

$postBody : Google_Service_Sheets_ValueRange
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool includeValuesInResponse Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values.

opt_param

string valueInputOption How the input data should be interpreted.

opt_param

string responseDateTimeRenderOption Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].

opt_param

string insertDataOption How the input data should be inserted.

opt_param

string responseValueRenderOption Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE.

Return values
Google_Service_Sheets_AppendValuesResponse

batchClear()

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

public batchClear(string $spreadsheetId, Google_Service_Sheets_BatchClearValuesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_BatchClearValuesResponse
Parameters
$spreadsheetId : string

The ID of the spreadsheet to update.

$postBody : Google_Service_Sheets_BatchClearValuesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Sheets_BatchClearValuesResponse

batchClearByDataFilter()

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)

public batchClearByDataFilter(string $spreadsheetId, Google_Service_Sheets_BatchClearValuesByDataFilterRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_BatchClearValuesByDataFilterResponse
Parameters
$spreadsheetId : string

The ID of the spreadsheet to update.

$postBody : Google_Service_Sheets_BatchClearValuesByDataFilterRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Sheets_BatchClearValuesByDataFilterResponse

batchGet()

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

public batchGet(string $spreadsheetId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_BatchGetValuesResponse
Parameters
$spreadsheetId : string

The ID of the spreadsheet to retrieve data from.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string dateTimeRenderOption How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].

opt_param

string majorDimension 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]].

opt_param

string ranges The A1 notation of the values to retrieve.

opt_param

string valueRenderOption How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.

Return values
Google_Service_Sheets_BatchGetValuesResponse

batchGetByDataFilter()

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

public batchGetByDataFilter(string $spreadsheetId, Google_Service_Sheets_BatchGetValuesByDataFilterRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_BatchGetValuesByDataFilterResponse

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
$spreadsheetId : string

The ID of the spreadsheet to retrieve data from.

$postBody : Google_Service_Sheets_BatchGetValuesByDataFilterRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Sheets_BatchGetValuesByDataFilterResponse

batchUpdate()

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

public batchUpdate(string $spreadsheetId, Google_Service_Sheets_BatchUpdateValuesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_BatchUpdateValuesResponse

(values.batchUpdate)

Parameters
$spreadsheetId : string

The ID of the spreadsheet to update.

$postBody : Google_Service_Sheets_BatchUpdateValuesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Sheets_BatchUpdateValuesResponse

batchUpdateByDataFilter()

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)

public batchUpdateByDataFilter(string $spreadsheetId, Google_Service_Sheets_BatchUpdateValuesByDataFilterRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_BatchUpdateValuesByDataFilterResponse
Parameters
$spreadsheetId : string

The ID of the spreadsheet to update.

$postBody : Google_Service_Sheets_BatchUpdateValuesByDataFilterRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Sheets_BatchUpdateValuesByDataFilterResponse

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

clear()

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)

public clear(string $spreadsheetId, string $range, Google_Service_Sheets_ClearValuesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_ClearValuesResponse
Parameters
$spreadsheetId : string

The ID of the spreadsheet to update.

$range : string

The A1 notation of the values to clear.

$postBody : Google_Service_Sheets_ClearValuesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Sheets_ClearValuesResponse

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

get()

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

public get(string $spreadsheetId, string $range[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_ValueRange
Parameters
$spreadsheetId : string

The ID of the spreadsheet to retrieve data from.

$range : string

The A1 notation of the values to retrieve.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string valueRenderOption How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.

opt_param

string majorDimension 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]].

opt_param

string dateTimeRenderOption How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].

Return values
Google_Service_Sheets_ValueRange

update()

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

public update(string $spreadsheetId, string $range, Google_Service_Sheets_ValueRange $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Sheets_UpdateValuesResponse
Parameters
$spreadsheetId : string

The ID of the spreadsheet to update.

$range : string

The A1 notation of the values to update.

$postBody : Google_Service_Sheets_ValueRange
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool includeValuesInResponse 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).

opt_param

string valueInputOption How the input data should be interpreted.

opt_param

string responseValueRenderOption Determines how values in the response should be rendered. The default render option is ValueRenderOption.FORMATTED_VALUE.

opt_param

string responseDateTimeRenderOption Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is DateTimeRenderOption.SERIAL_NUMBER.

Return values
Google_Service_Sheets_UpdateValuesResponse

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results