What is a CSV file? How to open and use the popular spreadsheet file (2024)

Reviews Tech

  • A CSV (comma-separated values) file is a 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.

Advertisem*nt

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. Here's what you need to know about CSV files and how to use them.

Advertisem*nt

What is a CSV file used for?

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.

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:

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.

Advertisem*nt

How to open a CSV file in Microsoft 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 and use the popular spreadsheet file (1)

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 and use the popular spreadsheet file (2)

6. If needed, you can click a column and change the kind of formatting for that data. When you're satisfied, click Finished.

Advertisem*nt

How to open a CSV file in Google Sheets

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.

What is a CSV file? How to open and use the popular spreadsheet file (3)

3. The CSV will automatically be formatted properly and appear in Sheets.

Advertisem*nt

How to open a CSV file 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, select the CSV file. Depending on the editor, you may need to click a drop-down menu to the right of the "File name" field. If it's currently set to "Text Documents," change it to "All Files."

What is a CSV file? How to open and use the popular spreadsheet file (4)

4. Find the CSV file and select it.

Advertisem*nt

How to create a CSV file

You can create CSV files in a few different ways.

From an Excel spreadsheet

1. Open your Excel document and click on the File tab. In the menu that appears, select Save As.

2. Change the File Format to either Text (Tab delimited) or CSV (Comma delimited).

What is a CSV file? How to open and use the popular spreadsheet file (5)

3. Navigate to the location where you wish to save the file, give it a name, and click Save.

Advertisem*nt

From a Google Sheet

1. Open the Google Sheet that you wish to export.

2. Click File, then Download, and click Comma Separated Values (.csv).

What is a CSV file? How to open and use the popular spreadsheet file (6)

Advertisem*nt

In a text editor

1. Create a new text file using a text editor, such as Notepad on Windows or TextEdit on macOS.

2. Enter the data that you want the document to contain, separating each value with a comma and each row with a new line.

What is a CSV file? How to open and use the popular spreadsheet file (7)

3. Save the file with the extension .csv.

What is a CSV file? How to open and use the popular spreadsheet file (8)

Dave Johnson

Freelance Writer

Dave Johnson is a technology journalist who writes about consumer tech and how the industry is transforming the speculative world of science fiction into modern-day real life. Dave grew up in New Jersey before entering the Air Force to operate satellites, teach space operations, and do space launch planning. He then spent eight years as a content lead on the Windows team at Microsoft. As a photographer, Dave has photographed wolves in their natural environment; he's also a scuba instructor and co-host of several podcasts. Dave is the author of more than two dozen books and has contributed to many sites and publications including CNET, Forbes, PC World, How To Geek, and Insider.

What is a CSV file? How to open and use the popular spreadsheet file (2024)
Top Articles
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 6234

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.