Introducing Flights: agent-native data pipelines in MotherDuckJoin the livestream

Skip to main content

Excel

Excel workbooks can be loaded through DuckDB's Excel extension and stored in MotherDuck for repeatable SQL analysis.

How it works with MotherDuck

  1. Connect to MotherDuck from a DuckDB client.
  2. Install and load the DuckDB Excel extension in the client session.
  3. Use read_xlsx to read a workbook and create a MotherDuck table from the result.

Example

INSTALL excel;
LOAD excel;

CREATE TABLE my_table AS
SELECT *
FROM read_xlsx('workbook.xlsx');

To read a specific worksheet, pass the sheet parameter:

CREATE OR REPLACE TABLE my_database.main.excel_data AS
SELECT *
FROM read_xlsx('workbook.xlsx', sheet = 'Sheet1');