Answers / Get data into your AI
How do I load every sheet of an Excel file as separate tables?
Recipe verified on
Ran on a private test instance
Short answer
cdb-localdata does it by default: every sheet of every workbook in the folder becomes its own table, <namespace>.<file>.<sheet>. Sync once and your AI sees one table per sheet.
Steps
- Connect your assistant to your instance (this writes, so it needs your own instance with a ReadWrite key
from the accounts portal; the public demo is read-only). In Claude Code:
claude mcp add --transport http mcpdata https://[you].mcpdata.org/mcp --header "Authorization: Bearer $CDB_API_KEY"
Replace
[you]with your instance's name. Other apps: Connect your AI. - Install the client and sign it in.
pip install https://[you].mcpdata.org/help/download/cdb-0.3.4-py3-none-any.whl cdb-localdata login --to https://[you].mcpdata.org
- Add the folder and sync it. Each sheet of orders_workbook.xlsx is listed as it's sent:
cdb-localdata add ./samples/excel --to https://[you].mcpdata.org --namespace sheets --name sheets cdb-localdata sync
- Ask your question. Give your AI this prompt:
Using mcpdata, which tables came from orders_workbook, and how many rows does each have?
What your AI does: the tool call it makes for this prompt, and what came back
list_tables() → 17 tables: mycsv.orders_mixed_dates, shop.orders, shop.customers, shop.products
Output of the steps above, from the last run
added /tmp/recipe-vk7plg24/samples/excel -> https://recipes.mcpdata.org as source sheets (tables under sheets.*); `cdb-localdata sync` sends it now, `cdb-localdata install` keeps it in step /tmp/recipe-vk7plg24/samples/excel -> https://recipes.mcpdata.org (sheets, sheets.*) + orders_workbook.xlsx [Orders] -> sheets.orders_workbook.Orders (10000 rows) + orders_workbook.xlsx [Customers] -> sheets.orders_workbook.Customers (1000 rows) + orders_workbook.xlsx [Products] -> sheets.orders_workbook.Products (2000 rows) 3 sent, 0 unchanged, 0 removed, 0 problem(s)
| table | rows | last_updated |
|---|---|---|
| mycsv.orders_mixed_dates | 10,000 | 2026-10-29 17:02:10.834000 |
| shop.orders | 10,000 | 2026-10-29 17:02:13.202000 |
| shop.customers | 1,000 | 2026-10-29 17:02:12.181000 |
| shop.products | 2,000 | 2026-10-29 17:02:13.378000 |
| Demo.Orders | 300,153 | 2026-10-29 17:01:54.893000 |
| Demo.Customers | 200,000 | 2026-10-29 17:01:24.247000 |
| Demo.Products | 2,000 | 2026-10-29 17:01:24.581000 |
| changes.book | 591 | 2026-10-05 00:00:00 |
| sheets.orders_workbook.Customers | 1,000 | 2026-10-29 17:02:31.556000 |
| sheets.orders_workbook.Orders | 10,000 | 2026-10-29 17:02:31.412000 |
| sheets.orders_workbook.Products | 2,000 | 2026-10-29 17:02:31.681000 |
| pq.orders_sample | 100,000 | 2026-10-29 17:02:22.516000 |
The assistant needs mcpdata connected (step 1) to run the query.
Why this works
Separate tables keep each sheet's own columns, so a Customers sheet and an Orders sheet don't get mixed. The AI can then combine them in a saved view with a JOIN when it needs both.