How to Query Excel and CSV Using Natural Language
Spreadsheets are the backbone of modern business operations. But as workbooks grow across dozens of sheets, extracting insights usually means wrestling with nested VLOOKUP, XLOOKUP, INDEX/MATCH, or brittle pivot tables.
Natural language spreadsheet querying lets you ask questions about your Excel workbooks and CSV files in plain English. Instead of typing formulas like =SUMIFS(C2:C100, A2:A100, "Enterprise", B2:B100, ">2026-01-01"), you simply ask:
"What is the total revenue for Enterprise accounts in 2026?"
This guide explains how natural language spreadsheet querying works, how to perform multi-sheet joins without formulas, and how Insight O' Mate accomplishes this entirely on your machine without uploading your files to any cloud server.
Why query spreadsheets with plain English?
Spreadsheet analysis typically suffers from three major pain points:
- Syntax friction: Formulas require exact syntax, correct coordinate ranges, and careful handling of errors (
#N/A,#VALUE!). - Cross-sheet join complexity: Combining customer information from one worksheet with order rows on another worksheet requires tedious lookup formulas that break when columns are reordered.
- Data privacy concerns: Many cloud-based "chat with Excel" tools require uploading confidential financial statements, customer lists, or proprietary metrics to remote AI servers.
Insight O' Mate solves this with a local-first spreadsheet engine. You drag and drop your .xlsx, .xlsm, or .csv files into the desktop client, and query them just like a database collection — with zero cloud file uploads.
How local spreadsheet querying works
Insight O' Mate executes queries in three stages:
1. In-memory workbook parsing. The desktop sidecar reads your spreadsheet files directly from disk. Each sheet in a workbook is treated as an isolated collection. Column header rows are automatically detected, and formatted currency strings (e.g. $1,450.00), percentages (35%), and Excel date serials are coerced into native numeric and Date primitives.
2. Intent translation. Your plain-English prompt and column header names (never your row values) are evaluated by our stateless NLP query engine. The engine produces an Abstract Syntax Tree (AST) representing the required filters, aggregations, and join keys.
3. Local execution. The local in-memory aggregator executes the operations directly on your computer. Results are displayed in interactive tables and charts within the desktop app.
Example spreadsheet queries and local pipelines
Here is what real natural language spreadsheet querying looks like in practice:
1. Grouping and multi-metric aggregation
Prompt: "Show me total revenue and units sold grouped by product category, sorted by highest revenue."
// Local In-Memory Aggregator on sheet: "Sales"
const results = aggregate(sheets["Sales"], {
groupBy: "category",
metric: {
totalRevenue: { field: "revenue", aggregation: "sum" },
unitsSold: { field: "quantity", aggregation: "sum" }
},
sort: [{ field: "totalRevenue", direction: "desc" }]
});
2. Cross-sheet join (replacing VLOOKUP/XLOOKUP)
Prompt: "Join the Orders sheet with the Customers sheet and find all delayed orders over $1,000."
// Hash join between sheets on matching ID
const joined = hashJoin(sheets["Orders"], sheets["Customers"], {
on: { left: "customerId", right: "id" }
});
const results = filter(joined, {
status: { $eq: "Delayed" },
totalAmount: { $gt: 1000 }
});
3. Date filtering and currency calculations
Prompt: "Find average approved expense amounts between July and September 2026."
// Auto-coerces formatted currency ($540.20 -> 540.2) & ISO dates
const q3Expenses = filter(sheets["Expenses"], {
status: { $eq: "Approved" },
expenseDate: {
$gte: new Date("2026-07-01"),
$lte: new Date("2026-09-30")
}
});
const average = averageBy(q3Expenses, "amount");
Privacy-first spreadsheet intelligence
Most teams cannot upload sensitive corporate spreadsheets to external AI chatbots or third-party web scrapers. Insight O' Mate is strictly privacy-first:
- Files never leave your device: Your
.xlsxand.csvfiles are parsed locally in memory. - Zero data retention: Only your English prompt and column names are evaluated to detect query intent.
- Live file watching: Update numbers or add new rows in Microsoft Excel, Google Sheets (exported to local disk), or Apple Numbers — Insight O' Mate automatically re-evaluates without reconnecting.
Ready to explore your spreadsheets with plain English? Download Insight O' Mate for macOS, Windows, and Linux, or read more in our complete guide to natural language querying.