What is a CSV file? How to open, use, and save the popular spreadsheet file in 3 different apps

Advertisement
What is a CSV file? How to open, use, and save the popular spreadsheet file in 3 different apps
A CSV file is a plain text file that can be opened in a variety of programs.dowell/Getty Images
  • A CSV (comma-separated values) file is a simple text file in which information is separated by commas.
  • CSV files are most commonly encountered in spreadsheets and databases.
  • You can use a CSV file to move data between programs that aren't ordinarily able to exchange data.
Advertisement

If you spend any time with spreadsheet applications like Microsoft Excel or Google Sheets - or even import certain kinds of data into Microsoft Outlook - you will inevitably encounter a comma-separated values file, commonly known as a CSV.

A CSV file is a simple text file that you can open in a wide variety of programs, including any program that works with plain text like the Notepad app; what makes a CSV file unique is the way its content is organized.

What to know about a CSV file

A CSV file, as the name implies, typically separates information using commas. It's a way to exchange structured information, like the contents of a spreadsheet, among programs that can't necessarily talk to one another directly.

Complimentary Tech Event
Transform talent with learning that works
Capability development is critical for businesses who want to push the envelope of innovation.Discover how business leaders are strategizing around building talent capabilities and empowering employee transformation.Know More

As long as two programs can both open a CSV file, they can exchange data. For example, you can save contact information from Microsoft Excel as a CSV file, and import it into the address book in Microsoft Outlook.

A typical CSV file looks like this, where each line contains the same sequence of data so any program which needs to read it knows what to expect:

Advertisement

Product, Size, Color, Price

Shirt, Medium, Blue, $14

Shirt, Large, Red, $15

Pants, Medium, Khaki, $23

Despite the name, a CSV doesn't need to rely on commas as the separator between pieces of information. This separator, called a delimiter, can be a semicolon, space, or some other character, though the comma is most common.

How to open a CSV file in Microsoft Excel

Because CSV files are so simple, most spreadsheet apps can open and save CSV files.

Here is how to do that in Excel:

  1. In Excel's ribbon, click the "File" tab and then click "Open."
  2. Click "Browse" and, in the File Explorer box, click the drop-down menu to the right of the File name field. It usually defaults to All Excel Files - change it to "All Files."
  3. Navigate to the location where the CSV file is stored and select it.

    What is a CSV file? How to open, use, and save the popular spreadsheet file in 3 different apps
    You might need to change the file type to "All Files" to see the CSV in Excel.Dave Johnson/Insider
  4. Follow the Text Import Wizard to open the CSV. Usually, you'll want to select the option to import delimited data (this would be the comma or other separator) and click "Next."
  5. Choose the kind of delimiter the file is using. You'll know you've selected the correct delimiter when the preview appears structured and organized properly. Click "Next."

    What is a CSV file? How to open, use, and save the popular spreadsheet file in 3 different apps
    When you choose the correct delimiter, you should see all the data organized properly in the preview.Dave Johnson/Insider
  6. If needed, you can click a column and change the kind of formatting for that data. When you're satisfied, click "Finished."

Quick tip: You can also easily save a spreadsheet as a CSV file to import it into a different program. Save the file as you usually would - choose "File" and "Save As," but then choose "CSV UTF-8 (Comma delimited) (*.csv)" from the file type menu.

How to open a CSV file in Google Sheets

Opening a CSV file in Google Sheets is much simpler because Sheets automatically sets all the options during import.

Advertisement
  1. In Google Sheets, click "File" and then click "Open."
  2. Find the CSV file and select it. If needed, click "Upload" and then drag and drop it from your computer.
  3. The CSV will automatically be formatted properly and appear in Sheets.

How to open a CSV in a text editor

Unlike spreadsheets, a text editor won't automatically format or structure the CSV file for you. Instead, you'll simply see the data separated by the comma or other delimiter. It's usually not aesthetically appealing, but it's an easy way to see the content of the file.

  1. Open a text editor like Windows Notepad or TextEdit.
  2. Click "File" and then "Open."
  3. In the "File Open" dialog box, click the drop-down menu to the right of the "File name" field. If it's currently set to "Text Documents," change it to "All Files."
  4. Find the CSV file and select it.

    What is a CSV file? How to open, use, and save the popular spreadsheet file in 3 different apps
    When you open a CSV in a text editor, you should see the data in its "raw" form.Dave Johnson/Insider

And of course, once you've imported your CSV file into any of these programs, you can then edit the data like you would with any other file.

How to split cells into columns in Microsoft Excel using the 'Text to Columns' featureHow to convert an Excel spreadsheet to a Google Sheets documentHow to see the edit history for cells in Google Sheets and spot changes or mistakes in a spreadsheetThe 35 best Google Sheets keyboard shortcuts for speeding up your workflow on a Mac or PC
{{}}