Skip to main content

New level of functionality and performance in data access via Python

Project description

Python Connector for Microsoft Excel Online

Python Connector for Microsoft Excel Online is a connectivity solution for accessing Microsoft Excel Online from Python applications to read and update data. It fully implements the Python DB API 2.0 specification. The connector is distributed as a wheel package for Windows and Windows Server.

Standard SQL syntax

The connector fully supports the ANSI SQL standard and lets you execute SQL statements against your Microsoft Excel Online data just like you would normally work with relational databases. Simple queries are directly converted to Microsoft Excel Online API calls and executed on the Microsoft Excel Online side.

Connecting

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

Import the connector

First, import the Microsoft Excel Online connector module:

import devart.excelonline as excelonline

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.

Querying data

Once connected to Microsoft Excel Online, you can execute SQL queries to retrieve data from your Excel workbooks.

Execute a query

Create a cursor object using the cursor() connection method.

my_cursor = my_connection.cursor()

Execute a SQL query using the execute() cursor method.

my_cursor.execute("SELECT * FROM all_types")

Retrieve results using one of the fetch*() methods.

for row in my_cursor.fetchall(): 
    print(row)

Parameterized queries

You can use parameterized queries to pass variable values to your SQL statements. This allows you to reuse the same query with different data and helps to prevent SQL injection attacks.

Pass parameters as a list or tuple to the execute() method:

query = "SELECT Id, Name FROM Contact WHERE Name = ? AND Email = ?"
params = ["Jordan Sanders", "jordansanders@example.com"]
my_cursor.execute(query, params)
results = my_cursor.fetchall()
for row in results:
    print(row)

Each placeholder ? in the query is replaced with a corresponding value from the parameter list.

Ordering and activating the license

You can purchase a license for the connector on the ordering page:
https://www.devart.com/python/excelonline/ordering.html

To activate the license, follow the instructions in the documentation:
https://docs.devart.com/python/excelonline/activate-a-license.htm

What's new

Python Connector for Microsoft Excel Online 1.1

  • Added support for Python 3.14

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

devart_excelonline_connector-1.1.0-cp314-cp314-win_amd64.whl (5.6 MB view details)

Uploaded CPython 3.14Windows x86-64

devart_excelonline_connector-1.1.0-cp314-cp314-win32.whl (5.3 MB view details)

Uploaded CPython 3.14Windows x86

devart_excelonline_connector-1.1.0-cp313-cp313-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.13Windows x86-64

devart_excelonline_connector-1.1.0-cp313-cp313-win32.whl (5.3 MB view details)

Uploaded CPython 3.13Windows x86

devart_excelonline_connector-1.1.0-cp312-cp312-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.12Windows x86-64

devart_excelonline_connector-1.1.0-cp312-cp312-win32.whl (5.3 MB view details)

Uploaded CPython 3.12Windows x86

devart_excelonline_connector-1.1.0-cp311-cp311-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.11Windows x86-64

devart_excelonline_connector-1.1.0-cp311-cp311-win32.whl (5.3 MB view details)

Uploaded CPython 3.11Windows x86

devart_excelonline_connector-1.1.0-cp310-cp310-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.10Windows x86-64

devart_excelonline_connector-1.1.0-cp310-cp310-win32.whl (5.3 MB view details)

Uploaded CPython 3.10Windows x86

devart_excelonline_connector-1.1.0-cp39-cp39-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.9Windows x86-64

devart_excelonline_connector-1.1.0-cp39-cp39-win32.whl (5.3 MB view details)

Uploaded CPython 3.9Windows x86

devart_excelonline_connector-1.1.0-cp38-cp38-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.8Windows x86-64

devart_excelonline_connector-1.1.0-cp38-cp38-win32.whl (5.3 MB view details)

Uploaded CPython 3.8Windows x86

devart_excelonline_connector-1.1.0-cp37-cp37m-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.7mWindows x86-64

devart_excelonline_connector-1.1.0-cp37-cp37m-win32.whl (5.3 MB view details)

Uploaded CPython 3.7mWindows x86

File details

Details for the file devart_excelonline_connector-1.1.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c7a6bbfb69ec7c65f8d5e88307585329304ca338b0575fe981bbea8afc511784
MD5 4006ddd620a837ee1d7c99ead661ce80
BLAKE2b-256 c6730bbad129e53ed794c3e13550723d5f9b9d6d3af6e86113441b564837fb59

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp314-cp314-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 c4a32673d7c639e67f4cc4a5ed8bca08da6b0f67483139570c3f850dfdcbfea1
MD5 cc32d6121e3140c336ec4065d587a566
BLAKE2b-256 217313b2830a78c7f9dfbe4998403288c64a3611cd614fe9e702c147faf9fc8d

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2788aed1dae3d569a10a67958457b6adb94d85b36f70fda7fde7cbc782a1b1d0
MD5 bd8f6b5519c2275c8661a0149dfe394a
BLAKE2b-256 a1e6aeffc4d2421855b0b52639043544cb5567185ab6fc2170bd3f479acfb7f1

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 3aeaee686030073ee668f65c9533601f939441392730f0009e7f23c52d516588
MD5 d056342eeaee85ce6b1e97f7262e7f69
BLAKE2b-256 cc4229ed973abc69c08a67b44c48c60742b8f630e7e8c3ea33369f086b8f4ae2

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 810591ab21bab6e104b7e43f8ad3900905f885320dd204fda9133230662994b5
MD5 daf6219a56372b0e37ef49f2474892a5
BLAKE2b-256 e2c46e1ef246c8db6550a3d76d2ae8c25349527f4f090f458ebc553bd7e046dd

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 be1850ac413e3c2214387a58de16ae00b2be2b7e7fe45c130939a79f324ad9dd
MD5 a3c29019df511ce9d1c9710f2c1a37b8
BLAKE2b-256 5c3a994adc9e49b4a57bbb2c556b269b74d27af1706fea0c695b7152c9966db1

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8f2caceafe4aba3f3a756c722b0f60efc316b1a42e415af35fb20e0287965f1a
MD5 03635f466ca937cf8b8e2e5d1e330012
BLAKE2b-256 abeb068c976b34d09bc99f3820c5d222e30b9837dad2b6f2c9b87b6038e6ba1d

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 0330ef132ab4ea8c17e1fd8b635cbb58b0613ec94832f90274e1e8e51673bf9d
MD5 03d41be5e5989cc211f3e337c2d7fae8
BLAKE2b-256 7a908d0ed46db51c40f96828ce2624550030d3af6c5bb73c7054004cf1fc6142

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b367295d88093743b65f27c0771d7877d822b34432387124c5a6f8862979094e
MD5 6537fe0e348ca4ad51f7352b97e1768c
BLAKE2b-256 3ab546f731e15292ff5dc262cd99be34b91197bf6091cb75ec6eb9a2f4e9a211

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp310-cp310-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 c44783fd75a4d00d5b4c1bd2b00e745e783b9fc43847b498e2bb78b21b744319
MD5 0073ec77d78e36b0644d48c21dec2501
BLAKE2b-256 2f053f088c0775e5295e547b16faa0e15926b62551e65d0fab2d158308db2bea

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 80414fa02767522fbddb43b5f033de200cd9500f24e0fa5bf1b12e8baa57a859
MD5 0f750fd1717ab8e35d0b3a41b799bb80
BLAKE2b-256 729facb83b2883e1f9ec581c6b40a8ad8c2c68b981616608282ea955e9bd5190

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp39-cp39-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 a1ac69e110f78362e81868f60f74b58a377e06dbd3781d15ae9158cba026d144
MD5 59f89395f884497efcb879305a81de7d
BLAKE2b-256 87468e610eaa04bc0ea1edc653892b2a4931acffb392371414d08cd5d4c6fb56

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 694fbcb4a09fb636768203e3da5a83c1ce55ef47d6308e767cfb2d95df06717e
MD5 3c38aa0070df8385572fce53ce47f378
BLAKE2b-256 459860fa28178c7aebf585e99b9e736e44ec1c046a35fdb20958bda4e77349ba

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp38-cp38-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 1a8d62dbd408ce292a3f0034cee86ea1349f1abd684a3fc052507b8ddd383898
MD5 aff5330581493ba4e47cd4ad82ad810d
BLAKE2b-256 6dac3ac270b55b734e0e8d4610f69c56102aa235a246603a9abe4579b5cd2496

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e3125aed948f96b3540785b99c9649e2febcc41b548bcb0ab54aa489e5cc6639
MD5 bc9425bd1692ce80923f832be2c56094
BLAKE2b-256 9d2e031fa63744b759242ce323ce9b766ad7d8d06ef735247cd6d6cb13ab0c02

See more details on using hashes here.

File details

Details for the file devart_excelonline_connector-1.1.0-cp37-cp37m-win32.whl.

File metadata

File hashes

Hashes for devart_excelonline_connector-1.1.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 4b89bd6dfe2e38bbc3a75d6e024425b8bfe4edcfef33f91928d38e33732b85c2
MD5 7d8014c09da173043bd8bb8de5d3430b
BLAKE2b-256 1dd47184b7aea3581a4fd3c6b638aea67e3ea093cdf4ac868503d9de6da5ea57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page