Excel will not open it - the CSV is 4 GB

BigTextFileSplitter » Use cases » CSV too big for Excel

Download BigTextFileSplitter Free Trial »     Buy BigTextFileSplitter Now »

The situation

A reporting system exports a CSV per day, or per year, and it is 4 GB. Excel opens it, spins for a while, and then either gives up or leaves you with a sheet that stops partway through. The file is fine; it is simply more rows than a spreadsheet will hold.

Excel's sheet has a hard row limit of about a million rows, and a memory limit on top of that. A 4 GB CSV is several times past both. This is not a corrupt file and not a CSV problem - it is a file that has to be divided before a spreadsheet can open it.

What you do

  1. Click New Task and choose the CSV file.
  2. Pick the split mode: by line count (for example 200,000 rows per file, so every part stays inside Excel's limit) or into a fixed number of files (N files, evenly by size or by lines).
  3. Choose the output folder and click Split.
  4. Open the parts in Excel - each one fits.

Splitting a large CSV file into a fixed number of smaller files

The original file is never modified, and the encoding is preserved, so the parts are the same bytes as the source, just divided. Save the task as a session if next month's export should be split the same way.

The smaller CSV files produced by the split

What it will not do

BigTextFileSplitter splits text; it does not understand columns. Two consequences worth knowing before you start:

If you need to split by column value

Splitting by rows is the right answer when the file is too big. When the file has to be divided by a value - one file per customer, per region, per table - that is a different tool: DataFileSplitter splits structured CSV, JSON and XML by field value.

Related

Splitting a large CSV in the browser: split CSV. How-to article: splitting a large CSV into smaller files. Other formats: split TXT, split LOG, split JSON, split XML. Converting the parts to another format: DataFileConverter.