ballerinax/googleapis.sheets

3.2.0

Overview

The Ballerina connector for Google Sheets makes it convenient to implement some of the most common use cases of Google Sheets. With this connector, you can programmatically manage spreadsheets, manage worksheets, perform CRUD operations on worksheets, and perform column-level, row-level, and cell-level operations.

This module supports Google Sheets API v4.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the Google Sheets connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

Import the ballerinax/googleapis.sheets module into the Ballerina project.

Copy

Step 2: Create a new connector instance

Create a sheets:ConnectionConfig with the OAuth2 tokens obtained, and initialize the connector with it.

Copy

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.

    Following is an example on how to create a spreadsheet using the connector.

    Create Spreadsheet with given name

    Copy
  2. Use bal run command to compile and run the Ballerina program.

You can find a list of samples here

Other versions

See more...