Extension

beta

Excel Online

SQLite extension

Read and write to tables in an Excel file on your OneDrive

Free Only during beta

  • Version 0.2.0
  • SQLite 3.45.1 or newer
  • Operating system Linux & Mac (ARM)

This SQLite extension lists tables from an Excel file located on your Microsoft OneDrive as database tables, supporting both read and write queries. It also automatically detects column types and converts names to be compatible with SQL queries.

Key points

  • Calls Microsoft Graph directly from your local machine
  • Fast in-memory cache for the duration of the connection
  • Lists tables from your Excel file as database tables
  • Supports selecting, inserting, updating and deleting rows
  • Automatically detects dates, booleans and numbers
  • One-time download, no subscription needed

Example

select name, position from excel_table_1 where start_date > date('today'); ┌────────────┬─────────────────────┐ │ name │ position │ ├────────────┼─────────────────────┤ │ John Smith │ Key Account Manager │ └────────────┴─────────────────────┘

Configuration

Every new SQLite connection should call function excel_config with authentication details. This information is not saved, and kept in-memory for the duration of the connection.

select excel_config('token: ..., file: ..., writes: "..."');

  • token Access token to Microsoft Graph
  • file Path to Excel file from drive root
  • writes Comma delimited list of writes to allow. Accepts insert (i), update (u) and delete (d). Defaults to none for no writes allowed.
  • prefix Prefix for table names, defaults to excel_

FAQ

For any questions, support, or feedback regarding this extension, please let us know.

Why use SQLite extensions?

SQLite extensions can make your development faster and more efficient. They are helpful for both developers and users who are comfortable with SQL. Extensions provide privacy, control, and locality to your data and credentials. Read more

Why should I try this beta extension?

This extension is currently available for free to anyone who wants to try the Excel Online extension. If you send your feedback to support, you will receive the personal version for free when it is released.

How do you read the Excel file?

Once authenticated, the extension uses Microsoft Graph to access all tables saved in the connected Excel file.

Table and column names are automatically converted to snake_case for compatibility with SQL queries.

Data types for each column are determined by studying the first 10 rows of values, falling back to the original cell text.

When you access a table, all its rows are loaded into memory and stay there while the connection is open. However, this changes if a write operation is performed.

How do I get a token for Microsoft Graph?

You will need to setup you own oAuth client for Microsoft Graph with the and acquire a token with the appropriate scopes.

Please refer to Microsoft documentation for detailed instructions.

What Microsoft Graph scopes are needed?
We expect tokens to have the minimal scopes to allow reading and optionally writing to Excel files, as listed in the official documentation.
  • Files.Read – for reading Excel files
  • Files.ReadWrite – for reading and writing Excel files
How should I refresh expired tokens?

You can either refresh expired tokens based on your own records before using the extension, or react to the extension error messages with error code A79.

Runtime error: Source API access has expired Detail: Lifetime validation failed, the token is expired Help: Please check your credentials Code: A79

Can I delete rows from a table?
Yes, assuming that:
  • Your token has the scopes needed to write to the file
  • Your extension configuration allows deletions in writes
  • Your target table does not have any filtered columns. In such cases Microsoft Graph will reject moving cells in a table.
Are SharePoint drives supported?
No, SharePoint drives are not supported. The extension accesses files from the default drive linked to the authentication, which is usually either a personal or business OneDrive account.
How do I receive updates?

We will email you when an update to the same extension version has been released.