Intro
Google Spreadsheets is a Web-based application that enables you to create, update, modify spreadsheets and share the data live online. To learn more about the Google Sheets API, see (https://developers.google.com/sheets/api/guides/concepts ). You can connect to your Google Sheets account in the Data Center. This topic discusses the fields and menus that are specific to the Google Sheets connector user interface. To add DataSets, set update schedules, and edit DataSet information, see Adding a DataSet Using a Connector.Prerequisites
To connect to your Google Sheets account and create a DataSet, you must have the Service Token JSON key. To generate a Google Sheets service account JSON key, do the following:- Log into Google Cloud Console using https://console.cloud.google.com/.
-
Select the project.

-
On the left pane select IAM & Admin > Service Accounts.

-
Click + CREATE SERVICE ACCOUNT.

- Under Service account details, enter the service account name and click CREATE AND CONTINUE.
-
From the Select a role filter, under Quick Access select Basic > Owner and click CONTINUE.

- Click Done.
- On the left pane select IAM & Admin > Service Accounts and click the service account created.
-
Click Keys > Add Key > Create new key. A pop-up window opens.

- Select the Key type as JSON and click Create.
- The JSON file containing the JSON key downloads automatically.
- Save the downloaded file.
Enabling Google Sheets API
To enable the Google Sheets API, perform the following steps:- Navigate to the GCP Console.
-
On the left pane, under APIs and services, select Library.

- Search and click the Google Sheets API.
-
On the top of the page, click Enable.


Connecting to Your Google Sheets Account
This section enumerates the options in the Credentials and Details panes in the Google Sheets Connector page. The components of the other panes in this page, Scheduling and Name & Describe Your DataSet, are universal across most connector types and are discussed in great detail in Adding a DataSet Using a Connector.Credentials Pane
This pane contains fields for entering credentials to connect to your Google Sheets account. The following table describes what is needed for each field:Field | Description |
|---|---|
Service Token JSON | Copy and paste the complete contents of the.json file, generated from your Google API Console. |
Details Pane
Menu | Description |
|---|---|
| File Selection | The Spreadsheet ID is selected from the drop-down list. |
| Spreadsheet ID | Enter the Spreadsheet ID. The Spreadsheet ID is the last string of characters in the URL of your spreadsheet. For example, in the URL,https://docs.google.com/spreadsheets/d/12wVPoRgSLYcD1CBHpN4dpQiPHRNqV7azwGF4JbKoXaw/edit#gid=0,{” ”}the spreadsheet ID is, 12wVPoRgSLYcD1CBHpN4dpQiPHRNqV7azwGF4JbKoXaw . |
| Worksheet Name | Select the worksheet name from the drop-down list. |
| Spreadsheet Layout | Select the spreadsheet layout from the drop-down list. |
| Manually Enter Cell Ranges | Select this checkbox, if you want to manually enter the cell range. |
| Column Header Cell Range | Specify the cell range for the header column(For example, A1:N1). |
| Column Data Cell Range | Specify the cell range for the data columns (Optional, for example, A2:N27). |
| Row Header Cell Range | Specify the cell range for the header row (For example, A1:A27). |
| Row Data Cell Range | Specify the cell range for the data rows (Optional, for example, B1:N27). |
| Date Format | Select the date format from the drop-down list. There are two date formats:
|