ballerinax/microsoft.excel

2.3.0

Overview

Ballerina connector for Microsoft Excel connects the Microsoft Graph Excel API via Ballerina. It provides the capability to perform CRUD (Create, Read, Update, and Delete) operations on Excel workbooks stored in a Microsoft OneDrive.

This module supports Microsoft Graph API v1.0 version and only allows to perform functions behalf of the currently logged in user.

Prerequisites

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

  1. Create a Microsoft Office 365 account
  2. Obtain tokens
    Follow the steps here

Quickstart

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

Step 1: Import connector

Import the ballerinax/microsoft.excel module into the Ballerina project.

Copy

Step 2: Create a new connector instance

Create an excel: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 add a worksheet using the connector.

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