How to open large CSV files Excel can't handle
Excel's row limit is 1,048,576. Files that exceed it open truncated — often without an obvious warning — which is worse than failing outright, because the analysis looks fine and is quietly wrong. Here is how to work with files past that point.
First, confirm you are actually seeing every row
If a file opened in a spreadsheet lands on exactly 1,048,576 rows, it was truncated. Check the row count against the source before drawing any conclusion from the data.
A quick sanity check is to count rows in the tool you are about to use and compare it to the file size divided by a rough average row length. Order-of-magnitude agreement is enough to catch a truncation.
SELECT COUNT(*) AS row_count FROM orders;Why columnar engines handle this better
Spreadsheets store a grid of cells and keep formatting, formulas, and layout state for each one, which is why memory use climbs so steeply. A columnar engine like DuckDB stores each column as a typed array and reads only the columns a query touches.
The practical effect is that a query selecting three columns from a fifty-column file barely notices the other forty-seven, and aggregates run in a fraction of the memory a spreadsheet would need.
Aggregate rather than scroll
Nobody reads a million rows. The reason to open a large file is almost always to reduce it — to a total, a distribution, or a filtered subset small enough to look at.
Doing that reduction in the query rather than in the viewport is what makes large files manageable.
SELECT
DATE_TRUNC('month', order_date) AS month,
COUNT(*) AS orders,
SUM(revenue) AS revenue
FROM orders
GROUP BY month
ORDER BY month;Profile before you trust the numbers
Large files usually come from an export pipeline, and pipelines produce nulls, duplicated headers mid-file, and inconsistent date formats. Profiling the columns first — null counts, distinct values, min and max — catches these before they end up in a total.
The practical ceiling in a browser
A browser tab can address a few gigabytes, so files in the hundreds of megabytes are comfortable on a normal laptop. The limit is your machine rather than an upload quota or a row cap, and because NoEgress runs DuckDB locally, a large confidential file never has to be handed to a third party to be read.
For files beyond that, the same SQL works in desktop DuckDB — the queries in this guide transfer unchanged.
Frequently asked
What is Excel's maximum row count?
1,048,576 rows and 16,384 columns per sheet. Files larger than that open truncated.
How large a CSV can I open in the browser?
Files in the hundreds of megabytes work comfortably on a typical laptop. The constraint is browser tab memory, not a row limit or a server-side upload quota.
Is it faster than opening the file in a spreadsheet?
For aggregation and filtering, substantially — a columnar engine reads only the columns a query touches, while a spreadsheet materializes every cell.
More guides
How to query a CSV file with SQL
How to run SQL on an Excel spreadsheet
How to analyze confidential data without uploading it
How to compare two CSV files and find what changed