---
title: "MotherDuck, Meet Excel"
canonical: "https://motherduck.com/blog/motherduck-duckdb-meet-excel/"
---

# MotherDuck, Meet Excel

Somewhere right now, someone is pasting a CSV into `Q3_forecast_final_v2_REAL.xlsx`. Excel is where a lot of your carefully modeled data ends up, one export at a time, and every one of those exports is stale the moment it lands. The proper fix has been ODBC and Power Query, which works on Windows once someone installs a driver. In Excel for Mac or on the web, there was no good path at all.

Today we're releasing an experimental preview of [**MotherDuck for Excel**](https://motherduck.com/labs/excel/), an add-in that opens a MotherDuck pane inside Excel on Mac, Windows and the web. Load a table into an Excel Table or PivotTable, refresh it with one click, and write numbers back to the warehouse with a preview before anything changes.

<admonition type='info' title='Experimental'>
MotherDuck for Excel is a MotherDuck Labs preview. It can change or break without notice. Write back changes real tables, so try it on data you can re-create.
</admonition>

<mux-video playback-id="cTqUWNPMbAu8qEFWkJ9NTZCZaw7wds1eFJPxZcxzof8" title="MotherDuck for Excel demo"></mux-video>

Install takes about a minute from [motherduck.com/labs/excel](https://motherduck.com/labs/excel/).

## From search box to Excel Table

Sign in with your MotherDuck account, or paste an access token, and start typing. The search covers every database you can access, including shares, so `nyctaxi` finds `sample_data.nyc.taxi`. Pick columns, rename them for Excel, and add filters with a value picker that lists each column's most common values. Filters, sorting and row limits run in MotherDuck, so only the rows you asked for travel to Excel.

![The import editor for sample_data.nyc.taxi, with six columns picked and the value picker open on a passenger_count filter](excel-add-in-import-editor.png)

## Change a cell, change the report

A filter can also follow a cell. Type a start date into `B1`, refresh, and the table updates to match. Put a region or a date range in a couple of cells, and the sheet becomes a small report anyone can drive without touching SQL.

## Get your ducks in rows (and columns)

Excel stops at 1,048,576 rows per sheet. Plenty of warehouse tables don't. Import as a pivot instead: choose rows, columns and values, MotherDuck runs the aggregation, and Excel builds a native PivotTable on the summary. All 3.2 million rides in `sample_data.nyc.taxi`, by passenger count and payment type, arrive as 36 rows.

![The pivot editor: passenger_count as rows, payment_type as columns, sum of total_amount and average tip](excel-add-in-pivot-editor.png)

## SQL when you want it, AI when you don't

Write your own `SELECT`, with `:name` parameters you can link to cells like any filter:

```sql
SELECT passenger_count, count(*) AS trips, avg(total_amount) AS avg_total
FROM sample_data.nyc.taxi
WHERE trip_distance >= :min_distance
GROUP BY ALL;
```

Or select the sparkle button and ask a question, like "Which payment type has the highest average tip?" MotherDuck's [`prompt_sql`](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-sql/) writes the query, and you check it before loading.

![Ask AI with the tip question and the SQL MotherDuck wrote for it](excel-add-in-ask-ai.png)

## Refresh, don't re-export

Saved imports live in the workbook with their query and filters, but never your credentials. Send the workbook to your boss, and they hit refresh with their own MotherDuck access. A refresh finds the table even if someone moved or renamed it, and PivotTables built on it stay connected.

![The Saved imports tab with a taxi_summary pivot import and Refresh all](excel-add-in-saved-imports.png)

For people who never open a side pane, `=MOTHERDUCK.TABLE(...)` and `=MOTHERDUCK.SQL(...)` spill results into the sheet and recalculate like any other formula.

## Write back, with a preview

Every finance team has one: a mapping table or a set of targets that lives in Excel, gets maintained by hand, and somehow has to reach the warehouse. Usually that means an export, an upload, and hoping nobody edited the file in between. The **Write back** tab sends a range or Excel Table to MotherDuck as a new table, a replacement, appended rows, or an update or insert by key.

Nothing changes until you've seen a preview, like "2 new, 3 updated, 9 unchanged in sales_targets", with before and after values and links to the Excel cells behind any problem. Save the write-back, and next month you push the new numbers from the same spot.

![A write-back preview: 2 new, 3 updated, 9 unchanged, with before and after values for the updated rows](excel-add-in-write-back-preview.png)

## Come play

The quickest way to get a feel for it takes about five minutes. Install the add-in from [motherduck.com/labs/excel](https://motherduck.com/labs/excel/), open a blank workbook, search for `taxi`, and load `sample_data.nyc.taxi` as a pivot. Millions of taxi rides, summed up in a PivotTable you can poke at like any other. Then try it on your own data and see what your spreadsheets look like when they stop going stale.

When you want the details, the [docs](https://motherduck.com/docs/integrations/bi-tools/excel/add-in/) walk through every feature, including how to roll the add-in out to your whole organization.

This is an early preview, and it gets better with every bit of feedback. Tell us what you build with it, what you wish it did, and what breaks. And if you're the person who exports a fresh CSV for the finance team every Monday morning, we'd especially love to hear from you.
