CSV File Tutorial

What is a CSV File? Comma Separated Values (CSV) Standard File Format

A CSV file is plain text file which stores spreadsheet or database information in a very simple format. Normally it contains one record on each line, and each field within that record separated by a comma or another delimiter. The first line in a CSV file might contain the names of the columns of data, and is generally referred to as header.

The image below shows an Excel spreadsheet with a simple list of contacts.

sample-excel-spreadsheet


Sample Excel list of contacts spreadsheet

If this spreadsheet is saved on the native file format of Excel – XLSX or XLS depending upon Excel’s version – only Excel and applications that supprt its format can read the data. Now if it is saved as a CSV file, the data can be accessed by any application that supports text files, even a text editor like Notepad.

The image below shows what the data looks like in a text editor.

csv-file-notepad-preview


CSV File contents viewed in Notepad

CSV files are common on all computer operating systems and supported by almost all spreadsheets and database management systems. Even modern software applications and sites support CSV imports and/or exports because the format is so simple and widely recognized. This file type is often associated with Microsoft Excel as this is one of the standard ways to transfer data into and out of a spreadsheet.

The CSV file format is often used to exchange data between applications or to extract data for analysis. Although CSV files are becoming obsolete due to XML data exchange possibilities, they are still the only way to import and export data in some sites and applications.

Fields that contain a special character (comma, newline, or double quote), must be enclosed in double quotes, generally referred to as text qualifiers. Read more about these and other cases on our guides below:

How to convert CSV file to Excel Spreadsheet

How to convert Excel Spreadsheet to CSV File