$integration.googleSheets.readDataFromCells
The method is used to read data from cells in a Google spreadsheet.
Syntax
Accepted arguments
The method accepts 4 required arguments.
Argument | Description | Type |
---|---|---|
integrationId | Integration identifier | String |
spreadsheetId | Google spreadsheet identifier | String |
sheetName | The name of the necessary sheet | String |
cells | The cells from where data should be read | Array of strings |
An example of calling the method:
- ECMAScript 5
- ECMAScript 6
$integration.googleSheets.readDataFromCells(
"4404df16-bfc7-4bc6-9f84-65d02d000217",
"1gdkEwg2KMeKYJK-yrxgKuk9-uP7ntjtKg5ChDu8906E",
"Sheet1",
["B4", "D4"]
);
In the ECMAScript 6 runtime, the method is asynchronous.
await $integration.googleSheets.readDataFromCells(
"4404df16-bfc7-4bc6-9f84-65d02d000217",
"1gdkEwg2KMeKYJK-yrxgKuk9-uP7ntjtKg5ChDu8906E",
"Sheet1",
["B4", "D4"]
);
Return value
The method returns an array of objects with the following properties.
Property | Description | Type |
---|---|---|
cell | The cell coordinates | String |
value | The data received | String |
tip
The
cell
value follows the <sheet_name>!<cell_coordinates>
format.Example
This is an example of using the method for accessing a client database from the script.