How to Open a CSV File That Is Too Big for Excel

2026-11-27

Partly tested. We ran the parts that show commands and output. The rest comes from the project’s docs, and the post says where.

A CSV file too big for Excel does not fail, it gets cut: Excel can only show 1,048,576 rows, so it quietly drops the rest. To work with the whole file, load it through Excel’s Power Query on Windows, open it in a free large-file viewer like Tad, or ask it questions with DuckDB. I tested a 2.5-million-row file: DuckDB answered in under a second.

You double-click a CSV export. Excel thinks for a while, opens it, and everything looks fine. It isn’t. If the file had more rows than Excel can hold, the bottom part is simply gone.

The file is not broken. The window you opened it in is too small. Here is why that wall exists, what I lost when I hit it, and four free ways to open the whole thing.

A CSV file is plain text lines, while Excel is a fixed grid that ends at row 1,048,576

What a CSV file really is

Mind map of opening a CSV file too big for Excel: Excel stops at 1,048,576 rows, 1,451,425 orders lost in the test, Power Query, Tad viewer, DuckDB answers in under a second, xan splits into 1,000,000-row files

A CSV is plain text. One line is one row, and commas split the columns.

CSV stands for comma-separated values. Open one in Notepad and you see lines like 45,2025-06-24,Chennai,Food,3954.77. There are no cells, no colors, no formulas. Just text.

That is why CSV files can get huge. Text has no row limit, so a bank, a shop or a sensor can keep adding lines forever. My 100 MB test file below holds 2.5 million rows.

A spreadsheet works differently. Excel loads every row into a grid of cells so you can scroll, click and edit. That grid has a fixed size.

Why Excel cuts off a big CSV file

Because an Excel sheet stops at 1,048,576 rows and 16,384 columns. Anything past that does not load.

That first number is 2 to the power of 20, a round number for computers. The older .xls format stops even sooner, at 65,536 rows. Think of it as a notebook with a fixed number of pages: the story can be longer, but the notebook can’t.

When the data does not fit, Excel shows this warning: “This data set is too large for the Excel grid. If you save this workbook, you’ll lose data that wasn’t loaded.” It’s easy to click past it.

The second sentence is the dangerous one. If you press Save over the original CSV, the missing rows are deleted for good. Keep the original file untouched until you know you have everything.

How much data you lose: 1,451,425 orders in my test

In my test, more than half the file.

I wanted a real number, not a guess. So I made a sales-style CSV with 2,500,000 orders (order ID, date, city, category, amount), about 100 MB. Then I pushed it through LibreOffice Calc, which has the same 1,048,576-row cap as Excel. Here is what came out:

  • Rows in the CSV: 2,500,000 orders plus one header line.
  • Rows in the spreadsheet: exactly 1,048,576, the header plus 1,048,575 orders.
  • Orders that vanished: 1,451,425.
Real test: 2,500,000 orders in the CSV, 1,048,575 kept in the sheet, 1,451,425 silently gone

Any total you calculate from that sheet is wrong, and the sheet itself looks complete. That’s why “it opened” is not the same as “it opened everything”.

Which way should you open a big CSV?

Pick by what you need: stay in Excel, just look at the data, or get answers fast.

All four options below are free. They solve the same problem in different ways, so the right one depends on you, not on which tool is “best”.

Which free tool to use: Power Query, Tad, DuckDB or xan, depending on what you want to do
You want toUseInstall neededCatch
Stay in Excel and get totalsPower Query + PivotTableNone (Excel on Windows)You see summaries, not every row in the grid
Scroll, sort and filter with a mouseTadFree desktop appA viewer, so you look and filter rather than edit cells
Ask questions and export a smaller fileDuckDBOne commandYou type short SQL queries
Peek, count or split the filexanOne commandWorks in the terminal

Power Query: stay in Excel and get totals

Load the file into Power Query instead of the grid, then summarize it with a PivotTable.

Power Query is Excel’s built-in data loader. The trick is that it does not have to put every row into cells. It keeps the full data set behind the scenes and lets a PivotTable (a table that groups and totals data for you) read all of it.

I have not run these in Excel. They are Microsoft’s own steps for Excel on Windows:

  1. Open a blank workbook. Go to the Data tab.
  2. Click From Text/CSV and pick your file.
  3. In the preview window, open the Load menu and choose Load To.
  4. Pick PivotTable Report, then build your totals.
Four Power Query steps: Data tab, From Text/CSV, Load To, PivotTable Report

If you ever have to save a version from the grid, use File > Save a Copy with a name that says it isn’t the full data.

The honest limit: you still can’t scroll through 2.5 million rows in a grid. You get the answers, not the rows. If you want the rows, read on. If the spreadsheet you need lives inside your own app and not on your desktop, that is a different job: adding an Excel-like spreadsheet to a web app.

Tad: a free viewer for huge CSV files

Yes. Tad is a free desktop viewer for macOS, Windows and Linux built for large files.

Tad (a viewer for table-shaped data) opens CSV and Parquet files, plus SQLite and DuckDB databases. It is MIT licensed, so it costs nothing and the code is open.

It copes with big files because it doesn’t lean on a spreadsheet grid. Inside, it runs DuckDB (a fast database engine that reads files directly), so sorting and filtering happen in a database, not in millions of cells. Think of a librarian who fetches the shelf you ask for, instead of piling every book on your desk.

Flow: a huge CSV on disk goes to the DuckDB engine inside Tad, which sorts and filters in a database, and Tad shows you the result

Grab the installer for your system from tadviewer.com. It’s the pick for people who never want to touch a terminal.

DuckDB: ask the whole file questions in SQL

DuckDB lets you ask the file questions in plain SQL, with no import step. On my test file, every answer came back in under a second.

SQL (a simple language for asking questions of tables) reads almost like English: “select the city and the total amount from this file, grouped by city”. DuckDB runs that directly on the CSV path, and it figures out the columns by itself.

Install it with one command. If you have Python, pip install duckdb-cli works on Windows, Mac and Linux. On Windows you can also use winget install DuckDB.cli.

Then try these three on your own file, swapping in your column names:

# 1. How many rows are really in the file?
duckdb -c "SELECT count(*) FROM 'orders.csv'"

# 2. Total sales per city
duckdb -c "SELECT city, count(*) AS orders, round(sum(amount)) AS total FROM 'orders.csv' GROUP BY city ORDER BY total DESC"

# 3. Save only the rows you need into a file Excel can open
duckdb -c "COPY (SELECT * FROM 'orders.csv' WHERE city = 'Chennai' AND category = 'Food') TO 'chennai_food.csv'"
Real test: DuckDB counts, totals and exports a 2.5 million row CSV in under a second each

I ran all three on the 2.5-million-row file, on a small cloud machine with only 2 CPU cores:

  • Counting every row: 0.42 seconds, and it found all 2,500,000.
  • Totals for 8 cities: 0.50 seconds.
  • Filtering to Chennai food orders and saving them: 0.60 seconds, giving a 1.5 MB file with 39,443 orders.

That third command is the most useful one for everyday work. You let DuckDB shrink the giant file down to the slice you care about, then open that small file in Excel like normal.

xan: preview, count and split from the terminal

Use xan to preview, count or cut the file into Excel-sized pieces.

xan is a free command-line toolkit for CSV files. It replaced xsv, an older favorite whose author now marks it unmaintained and points people to xan or qsv. Install it with brew install xan on Mac, scoop install xan on Windows (after adding the extras bucket), or cargo install xan --locked anywhere Rust is set up. If you want xan next to its older rival, xan vs csvkit runs them side by side.

Four commands cover most needs:

xan count orders.csv                        # how many rows
xan slice -l 5 orders.csv | xan view        # first 5 rows as a neat table
xan frequency -s category orders.csv | xan view   # how often each value appears
xan split -S 1000000 -O parts orders.csv    # 1,000,000-row files, each with the header
Real test: xan shows the first rows as a table and splits the file into 1,000,000-row pieces

On my test file, the split gave three files: 1,000,000, 1,000,000 and 500,000 rows. Each one keeps the header line, so each opens cleanly in Excel. Splitting is the simplest fix when someone just needs “an Excel file”, but remember that totals across the pieces must be added up by hand.

So which one should you use?

If you live in Excel, start with Power Query. If you want speed and exact answers, use DuckDB.

There’s a fair case for staying in Excel. Your colleagues know it, your charts live there, and Power Query needs nothing new. For a monthly report, that’s often enough.

But when the file keeps growing, or you need the one slice that matters, DuckDB wins. It found every row, answered in under a second, and handed back a small file Excel opens without complaint.

If the file is really a stack of documents and not a table, converting documents to Markdown is the closer job.

Run the count command first. If the number is bigger than 1,048,576, now you know what Excel was hiding.

Leave a comment