Skip to Content
RowSlice

Guide

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

Published · Updated

You double-click a CSV and Excel either freezes, or opens it and warns that the file was not loaded completely. The file is not broken; it is simply bigger than a spreadsheet can hold. What to do next depends on what you actually need from the data.

First: Why the File Won’t Open

An Excel worksheet holds at most 1,048,576 rows and 16,384 columns. Google Sheets allows 10 million cells in a whole spreadsheet, which a 20-column file reaches at 500,000 rows; Google is doubling that to 20 million, rolling out from September 2026. A file can also be under those limits and still be unusable, because spreadsheets work out the type and formatting of every single cell, which gets slow once a file is a few hundred megabytes. See Excel’s row limit explained for the details.

Before you decide anything, it is worth knowing how big the file actually is in rows rather than in megabytes — how to count the rows in a CSV does it without opening the file. A 900,000-row export needs a different plan from a 90-million-row one.

Pick the Right Approach

What you needBest optionSkill needed
Work with all the rows in Excel1. Split into Excel-sized partsNone
Only one region, customer or category2. Split by column valueNone
Totals, pivots and summaries3. Excel Power Pivot / Data ModelSome Excel
Just look at the first rows4. A large-file text editorNone
Filter and query the full file5. DuckDBBasic SQL
Repeatable processing6. Python with pandasProgramming

1. Split the File into Parts That Fit

If you need to scroll, edit or share the actual rows, split the CSV into pieces of up to 1,000,000 rows each. Every part keeps the header row, so it opens as a normal spreadsheet. The large CSV splitter does this in the browser without uploading the file and without a size limit. Avoid splitting with a text editor or the Unix split command: both can cut a row in half when a quoted value contains a line break, and neither repeats the header.

A million rows is the Excel-shaped answer. If the parts are going into an import screen instead, the cap may be megabytes or cells rather than rows, and the number to type is different — how to split a CSV to fit an import limit has the published figures.

2. Split Out Only the Rows You Need

Very often nobody needs all 10 million rows at once. The finance team needs their cost centre, each store manager needs their store. Splitting by column value creates one file per value in a column you choose, and those files are usually small enough for Excel straight away.

3. Load It into Excel’s Data Model

Excel’s Data Model (Power Pivot) stores data outside the worksheet grid, so it is not bound by the row limit. In Excel for Windows, go to Data › Get Data › From File › From Text/CSV, choose the file, then pick Load To… and select Only Create Connection with Add this data to the Data Model ticked. You can then build PivotTables over many millions of rows. You cannot scroll through or edit the rows themselves this way.

4. View It in a Large-File Text Editor

If you only need to see what is in the file — the column names, a sample of rows, whether it looks corrupted — a text editor built for big files will open it quickly. EmEditor on Windows is designed for this, and on any system you can print the first lines from a terminal: head -n 20 file.csv on macOS and Linux, or Get-Content file.csv -TotalCount 20 in PowerShell. Ordinary Notepad struggles with very large files.

5. Query It with DuckDB

DuckDB is a free database that can run SQL directly against a CSV file without importing it first, and it copes well with files larger than your computer’s memory. After installing it, one line gives you a filtered result:

SELECT * FROM 'orders.csv' WHERE country = 'DE' LIMIT 100;

You can also save the result as a new, smaller CSV with COPY (SELECT …) TO 'germany.csv';

6. Process It with Python

If you will process the same export every week, a short script is worth writing. pandas can read a CSV in chunks so memory use stays low: pd.read_csv('file.csv', chunksize=500_000, dtype=str). Passing dtype=str matters: without it, pandas converts values such as 00742 to numbers, the same way Excel does.

What Not to Do

  • Don’t save the file after Excel’s “not loaded completely” warning. Saving writes back only the rows Excel loaded, and the rest are gone from that file.
  • Don’t upload confidential exports to a random website to open them. Check whether a tool processes files on your computer or on its server before you use it for customer or employee data.
  • Don’t double-click a part and save it back as CSV. Opening a CSV in Excel rewrites values as it reads them, so identifiers come out changed even though you touched nothing. If the data has to end up in a workbook, import it rather than open it.

On a Mac, opening a large CSV on a Mac covers Numbers, Terminal and DuckDB. If the file is headed for Google Sheets instead, its limit is on cells, not rows: what to do when a CSV is too large for Google Sheets shows how to work out whether it fits.

FAQ

Frequently Asked Questions

Why does Excel freeze instead of showing an error when I open a large CSV?

Because it is working, not crashing. As Excel opens a CSV it works out the type and formatting of every single cell, so a file of a few hundred megabytes can mean a long, unresponsive wait before anything appears. Passing the row limit gives you a clear warning; sheer size gives you silence. Rather than wait it out, count the rows first, then split the file into parts that open normally.

Can Notepad open a 2 GB CSV file?

In practice no — ordinary Notepad struggles with files anywhere near that size. The more useful point is that you rarely need the whole file open. Deciding what to do next usually takes only the column names and a handful of rows, which a large-file editor such as EmEditor, or a single head or Get-Content command, will show you in about a second on a file of any size.

How can I tell whether an online CSV tool uploads my file?

Disconnect from the network once the page has loaded and try the tool: one that processes files in your browser keeps working, and one that uploads cannot. Before that, read what the site says about itself — a tool that works on your own computer states it plainly. An upload-based tool also has to move the whole file across your connection first, so the wait grows with the file. If a site says nothing, assume the file goes to its server.

Do I have to install anything to query a CSV with DuckDB?

Yes — DuckDB itself, and nothing else. It is a free program you download and run: there is no server to set up, no database to create and no import step, because the SQL reads the CSV where it sits. It also copes well with files larger than your computer’s memory. If installing anything is out of the question at work, splitting by column value gets you a smaller file without SQL.

Can I actually edit the rows in a CSV that is too big for Excel?

Not in one window. Excel’s Data Model holds millions of rows but only for PivotTables — you cannot scroll through or edit the rows themselves. To edit, work on a piece at a time: split the file into parts of up to a million rows, or split out just the rows you need, edit those, then merge them back into one file.

Why does pandas change my ZIP codes when it reads a CSV?

Because pandas infers a type per column exactly as Excel does, so a column of digits becomes a number and 00742 arrives as 742. Pass dtype=str to keep every column as text: pd.read_csv('file.csv', chunksize=500_000, dtype=str). The chunksize argument is the other half of the answer, keeping memory use flat on a large file.

Guides

See All 20 CSV Guides