mcpdata Request an invite

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

  1. 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.

  2. 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
  3. 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
  4. 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)
What you should get · the recipe's real result from its last run, first 12 of 17 rows
tablerowslast_updated
mycsv.orders_mixed_dates10,0002026-10-29 17:02:10.834000
shop.orders10,0002026-10-29 17:02:13.202000
shop.customers1,0002026-10-29 17:02:12.181000
shop.products2,0002026-10-29 17:02:13.378000
Demo.Orders300,1532026-10-29 17:01:54.893000
Demo.Customers200,0002026-10-29 17:01:24.247000
Demo.Products2,0002026-10-29 17:01:24.581000
changes.book5912026-10-05 00:00:00
sheets.orders_workbook.Customers1,0002026-10-29 17:02:31.556000
sheets.orders_workbook.Orders10,0002026-10-29 17:02:31.412000
sheets.orders_workbook.Products2,0002026-10-29 17:02:31.681000
pq.orders_sample100,0002026-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.

Related questions