Guide

5 MIN READ

How do you let people use Claude with Excel files and still get the same numbers?

Claude can give different numbers from the same spreadsheet because each chat works out the metric again from the raw cells. Write the definitions down in a data model that reads the file, and have Claude query the model instead.

James Swirhun

James Swirhun

Published Dec 1, 2026

James Swirhun is Head of Product at Credible, an AI analytics engine that gives AI agents, data apps, dashboards and reports one data model to answer from, so everyone gets the same numbers.

Two people can upload the same spreadsheet to Claude, ask for last quarter's revenue, and get two different totals with no arithmetic mistake in either. Each chat decides for itself which column counts as revenue, which rows to leave out, and which dates make up the quarter.

Why can Claude give different numbers from the same Excel file?

Claude can give different numbers because every new chat calculates the metric again from the raw cells. It reads the file, writes its own code, and makes its own choices about columns, rows and dates. Unless those choices are written down where the next chat reads them, two chats can pick differently and both look right.

When you upload a CSV or spreadsheet, Claude writes and runs code, for example Python, to analyze it. Here is how the same question can split:

  1. A sales file has a Total column and a Status column with values like Complete, Returned and Cancelled.
  2. One chat sums Total for every row. That is gross revenue.
  3. Another chat drops returned and cancelled rows first. That is net revenue.
  4. Both answers are correct arithmetic. They answer different questions.

On one ecommerce dataset in our post How an agent turns a question into a trustworthy answer, gross revenue for January to October 2022 was $4,510,963 and net revenue was $4,305,542, which is 4.8% apart.

What needs to be written down so every chat gets the same number?

Every choice a person would otherwise make in their head needs to be written down: which column is the official figure, which rows are excluded, how the sheets connect, and what each period means.

For a small-company workbook, the list starts with these:

  • The metric itself. Revenue is Total minus returned and cancelled rows.
  • Who counts. A customer is anyone with at least one completed order.
  • How the tabs connect. The Orders tab links to the Customers tab on Customer ID. One order can have many line items, so sum order amounts from the Orders tab, not from the line items.
  • What the dates mean. The fiscal year starts in February. "Summer" is your sales season, not June to August.

In a test from our post Your Data Model Is Part of Your AI System, an agent read "summer sales" as June to August and answered $213,939. The company's season ran from May 25 to September 15, and the verified answer was $267,423, so the agent was 20% low.

Where should those definitions live so Claude reads them?

The definitions should live in a data model that reads the spreadsheet or CSV, and Claude should get its numbers by querying that model instead of reading the uploaded file. A data model is a file that states what each table, column and metric means.

Instructions saved in a Claude project apply to every chat in that project, which helps. But Claude still writes new code from those instructions in each chat, and chats outside the project never see them.

The connection works like this:

  1. The spreadsheet, or a CSV exported from it, is the data.
  2. The data model reads that file and defines revenue, customers and the rest.
  3. Claude connects to the model over MCP (Model Context Protocol), an open standard AI assistants use to call outside tools.
  4. Asked for revenue, Claude looks up the definition and runs a query against it, instead of writing its own formula from the cells.

Two people who ask through the model now get the same total, because both chats used the same definition. That holds for metrics the model defines. Claude can still choose its own measure for a word the model leaves out. A file uploaded straight into a chat skips the model, so point people to the model for figures that have to match.

What happens when the spreadsheet changes?

When the spreadsheet changes, you replace the file the data model reads, and every question after that runs on the new data. The definitions stay the same, so this month's revenue is calculated the same way as last month's. Nobody has to re-upload the file into each chat.

A workbook on someone's laptop does not update the model by itself. Someone, or a script, replaces the file as often as the business needs: daily, weekly or at month end. Keep the new file's name and location the same, so the model that reads it keeps working.

How do you check that everyone gets the same number?

Write down a short list of real questions with answers someone has verified by hand, then ask them through Claude and compare. Run the list again whenever the definitions or the file change. If an answer moves without a reason, a definition is missing, wrong or open to two readings, and you fix it in the model.

Pick the questions people actually ask: last month's revenue, top ten customers, orders by region. For checking a single answer, see How do I know if an AI answer about our data is right?

Where should a team start?

Malloy is an open-source, MIT-licensed language for writing data models. Malloy Publisher serves a model to Claude over MCP. Its setup command writes a model package around a CSV exported from your spreadsheet:

mkdir my-data && cd my-data
npm create @malloy-publisher/malloy-package@latest sales -- --data ~/orders.csv
npm start

The tutorial walks through connecting Claude. You don't need to buy anything to use it.

Credible runs the same models as a managed service. You upload the file in the browser, an agent drafts the model with you, and Upload new version replaces the file at the same path. Your team connects Claude to the model by signing in as themselves. See pricing or the docs.

Frequently asked questions

Can Claude analyze an Excel or CSV file on its own?

Yes. Claude can read an uploaded spreadsheet or CSV, write code such as Python to analyze it, and run that code in a private environment. That works well for exploring a file. Each chat writes its own code, so the next chat, or the next person, works out the calculation again and can make different choices.

Will the same prompt on the same file always give the same answer?

No. An AI model can write different code for the same request on different runs, and a short prompt leaves room for different choices about rows, columns and dates. Different wording from different people can widen the gap. Definitions written down where every run reads them keep repeated answers on the same calculation.

What is a data model?

A data model is a file that states what the data means. It names each table, says how tables relate, and defines each metric in one place: which column holds revenue, which rows to exclude, how to count a customer. Tools and AI assistants read it instead of guessing from raw column names.

Do people have to stop working in Excel?

No. People can keep building and editing the spreadsheet. The change is in where questions get answered. The exported file feeds a data model, and the AI answers from the model rather than from a copy someone pasted into a chat. When the spreadsheet changes, the new export replaces the old file.

Does this work with ChatGPT and other AI assistants too?

Yes, for assistants that can connect to outside tools over MCP (Model Context Protocol), an open standard that Claude and ChatGPT both support. An assistant connected to a data model over MCP looks up the definitions instead of reading the raw file, so different assistants use the same calculation for every metric the model defines.

The AI Analytics Engine

Make your data Credible

Model your data's meaning, and the AI Analytics Engine delivers answers you can trust to every agent, data app, and dashboard that asks.

Get started

Guide

7 MIN READ

Why don't AI answers match our dashboards?

An AI agent's total disagrees with the dashboard when it assumes a different definition, double-counts across a join, counts rows instead of orders, reads a partial month as a drop, or rebuilds a filter differently. How each happens, and how to check an answer.

Reviewed Nov 5, 2026

Guide

5 MIN READ

How do I know if an AI answer about our data is right?

You know an AI answer about your data is right when you can check it. The answer names the definition, dates and query it used, matches a number you already trust, and comes from a system tested on questions with verified answers.

Reviewed Nov 28, 2026

Guide

4 MIN READ

How do you get every team to agree on one number for each metric?

Getting every team to agree on one number for each metric takes one written definition per metric, kept in one source of truth that every report and AI agent reads. Without that, two reports can show different revenue for the same month.

Reviewed Nov 29, 2026