Search

Get Col Values

Last Updated: Sep 13, 2021

Articles

Use this function to read the values of a column in a worksheet from provided index.

Syntax

Get Col Values (id_or_url, sheet_name_or_index , col_index, private_key, cient_email)

Parameters

Input Parameter Name Description
id_or_url ID or URL of Google Sheet
sheet_name_or_index Name or index of worksheet
col_index Index of a Column
private_key Private key of the service account
client_email Email ID of the service account

Returns

Return Value Description
Output
  • On Success returns 1, Column values
  • On Failure returns 0, Error Message

Sample

Get Col Values (ABC123, Invoice, 3, 4, —–BEGIN PRIVATE KEY—–\nABCD\n—–END PRIVATE KEY—–, name@project-id.iam.gserviceaccount.com)

  • Uses the private key —–BEGIN PRIVATE KEY—–\nABCD\n—–END PRIVATE KEY—– to connect to the Email ID name@project-id.iam.gserviceaccount.com, accesses the sheet Invoice using the ID ABC123 and reads the value in the column 4.
    Returns the values 1, 2, 3 .

To view all the Google Sheets functions, click here.

Did you find what you were looking for?