What is a .csv file? CSV stands for Comma Separated Values. A CSV file is a plain text file that stores tables and spreadsheet information. The contents are often a table of text, numbers, or dates. CSV files can be easily imported and exported using programs that store data in tables.
CSV File Format
Usually the first line in a CSV file contains the table column labels. Each of the subsequent lines represent a row of the table. Commas separate each cell in the row, which is where the name comes from.
Here is an example of a CSV file. The example has three columns, labeled 'name', 'id', and 'food'. It has five rows including the header row.
name, id, favorite food quincy, 1, hot dogs beau, 2, cereal abbey, 3, pizza mrugesh, 4, ice cream
Here is how that file looks in a spreadsheet.
Since a CSV file is just a text file, you can create one in almost any text editor. You can also export CSV files from almost any spreadsheet program, such as Microsoft Word, OpenOffice Calc, or Google Sheets.
How to open a CSV file
Opening a CSV file is simpler than you may think. In almost any text editor or spreadsheet program, just choose File > Open and select the CSV file.
For most people, it is best to use a spreadsheet program. Spreadsheet programs display the data in a way that is easier to read and work with than a text editor. We'll go into more detail on opening a CSV file in Microsoft Excel, OpenOffice Calc, and Google Sheets.
Open a CSV file Microsoft Excel
If you already have Microsoft Excel installed, just double-click a CSV file to open it in Excel. After double-clicking the file, you may see a prompt asking which program you want to open it with. Select Microsoft Excel.
If you are already in Microsoft Excel, you can choose File > Open and select the CSV file. If you don't see the file you want to open, you may need to change the file type to be opened to "Text Files (*.prn, *.txt, *.csv)". Excel will display the data in a new workbook.
You can also import data from a CSV file into an existing worksheet.
- On the Data tab, in the Get & Transform Data group, click From Text/CSV.
- In the Import Data dialog box, double-click the CSV file you want to import, and click Import.
In the preview dialog box, you have a few options:
- Select Load if you want to load the data directly to a new worksheet.
- Select Load to if you want to load the data to a table or existing worksheet.
- Select Transform Data if you want to load the data to Power Query, and edit it before bringing it to Excel.
Open a CSV file OpenOffice Calc
If you already have OpenOffice Calc installed, just double-click a CSV file to open it. After double-clicking the file, you may see a prompt asking which program you want to open it with. Select OpenOffice Calc.
If you are already in OpenOffice Calc, you can choose File > Open and select the CSV file.
Open a CSV file Google Sheets
First, open a new spreadsheet file in Google Sheets. The fastest way is to go to https://sheets.new.
Next, select File > Import.
Select the Upload tab, then either drag the CSV file onto the window or select the CSV from your computer.
You can probably keep the default values on the Import file window, but look over them just to make sure. Then select Import data.