Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

field size limitation of csv file

Tags:

csv

I was wondering if there is a limit to the size of a single field that can be saved in a csv file? I understand that the size of the CSV file itself is dependent only on the operating system.

Thanks.

like image 321
Regmi Avatar asked Apr 02 '12 06:04

Regmi


People also ask

Can CSV hold more than 1 million rows?

CSV files have no limit of rows you can add to them. Excel won't hold more that the 1 million lines of data if you import a CSV file having more lines. Excel will actually ask you whether you want to proceed when importing more than 1 million data rows.

How do I create a CSV file with more than 1 million rows?

The Solution You basically load the data into what Excel calls a Data Model, keeping just a link to the original CSV file. After that, you can create a Pivot Table directly from the Data Model. With that method, you will be able to load millions of rows.


3 Answers

The history of CSV is described at Wikipedia. The closest thing to a formal specification of the CSV file format is RFC4180.

Neither of these documents describe any limits on the size of a field. In practice the tooling you use might have some sort of restriction, as most CSV parsers would buffer the record line, prior to splitting it.

like image 107
Mark O'Connor Avatar answered Oct 01 '22 12:10

Mark O'Connor


Excel specifications and limits Excel cannot read more than 32767 characters in a single cell. Total number of characters that a cell can contain: 32,767 characters

like image 35
Virendra Kumar Avatar answered Oct 01 '22 11:10

Virendra Kumar


"The new" Google Sheets limits you to 50,000 characters / field. You get an error message (see below) if you try to paste more than that.

If you upload a .csv there is no warning, but the offending field and all following fields in that row are dropped.

sheets error message

like image 28
Jay Avatar answered Oct 01 '22 12:10

Jay