We Built a Machine for Getting AnswersTry the MotherDuck MCP

Skip to main content

Connect MotherDuck to Excel

Use Excel's 'Get Data' flow with the DuckDB ODBC driver to load MotherDuck data into Excel. This setup works well for recurring reporting, analysis, ad hoc SQL exploration, finance models, and operational dashboards without having to rely on exported CSVs.

Before you start

To get started you'll need the following.

  • Windows + Excel (ODBC is Windows-only for this flow)
  • A MotherDuck access token (create one in the MotherDuck token page)
  • Admin rights on your computer to install the ODBC driver

Installation steps

1. Install the DuckDB ODBC driver

  1. Download the latest DuckDB ODBC driver for Windows (amd64):
  2. Extract the .zip file and run odbc_install.exe as Administrator (right click -> Run as administrator).

2. Configure the DuckDB System DSN

  1. Open the ODBC Data Source Administrator:
    • 64-bit Excel: Start menu -> ODBC Data Sources (64-bit)
    • 32-bit Excel: Start menu -> ODBC Data Sources (32-bit)

ODBC Data Sources in Windows

  1. Go to System DSN, select DuckDB, and click Configure. Select the DuckDB system DSN

  2. Set Database to one of the following:

    • Recommended (scoped): md:your_database_name
    • Open scope: md: (allows access to any database)
  3. Click OK to save.

DuckDB ODBC configuration for MotherDuck

3. Connect from Excel (Get Data)

  1. In Excel, go to Data -> Get Data -> From Other Sources -> From ODBC.

Excel Get Data menu 2. Choose DuckDB from the DSN dropdown and click OK.

From ODBC dialog in Excel 3. On the credentials screen, choose Default or Custom and add this to the Connection string properties field:

motherduck_token=<YOUR_MOTHERDUCK_ACCESS_TOKEN>

DuckDB ODBC driver installer

  1. Click Connect.

4. Load or transform data

Use the Navigator window to select tables and choose Load to bring data into Excel, or Transform Data to shape it in Power Query before loading.

Tips

  • If you change your MotherDuck token, update the connection string properties in Excel.
  • If you use multiple databases, create separate DSNs (e.g., DuckDB - analytics, DuckDB - finance) with different md:database values.

Troubleshooting

How do I delete an existing MotherDuck connection in Excel?

  1. In Excel, go to Data -> Queries & Connections.
  2. Find the connection you want to remove, right click it, and choose Delete.

How do I modify an existing MotherDuck connection?

  1. In Excel, go to Data -> Queries & Connections.
  2. Right click the connection and choose Properties.
  3. Open the Definition tab and update the connection string (for example, update motherduck_token=...) and save.

If you don't see the Definition tab, use Data -> Get Data -> Data Source Settings, select your DuckDB connection, then choose Change Source or Edit Permissions as needed.