Python Connector for Microsoft Excel Online

Connecting to Microsoft Excel Online - Python Connector for Microsoft Excel Online

Connecting to Microsoft Excel Online

To connect to Microsoft Excel Online, import the connector and use the connect() method with your connection parameters.

Step 1. Import the connector

First, import the Microsoft Excel Online connector module:

import devart.excelonline as excelonline

Step 2. Establish a connection

Call the connect() method and obtain a connection object.

response = excelonline.signin()
my_workbook = excelonline.getworkbook()
my_connection = excelonline.connect(
    WorkbookId=my_workbook["Workbook Id"]
    RefreshToken=response["Refresh Token"]
)

Replace the example values with your actual connection values.

For more information about the connection parameters you can use in the connect() method, see Connection parameters.

© 2022-2026 Devart. All Rights Reserved. Request Support Python Connectors Forum Provide Feedback