How do I make a CSV file?

  • Home
  • Productivity

Have you been wondering what is a CSV file? Here's everything you need to know about it, and how to create one.

Man looking at laptop

If your job involves working with spreadsheet programs such as Google Sheets or Microsoft Excel, there is a chance one of your coworkers has sent you a CSV file. But what is a CSV file, and what can you do with it?

In this article, we’ll explain what a CSV file is, take a look at its format, and show you how to open and create a CSV file.

What Is a CSV File?

A CSV (or Comma Separated Value) file is a text file that contains data in list form. The CSV files are generally used to share data between programs that can’t open the same file type.

So if you plan on sending someone an Excel spreadsheet before leaving the office for a few days, you should attach to the email a CSV file containing the same data.

CSV File Format

CSV files are characterized by simple structures. Once you’ve opened a CSV file, you will see lines containing the same sequence of data. Usually, commas separate the data.

csv-format

CSV files don’t always use commas to separate information. A semicolon, space, or a different character might separate the pieces of information. However, the most common character is the comma.

In case you are not sure if the file you opened is a CSV file, look at its extension. CSV files have the .csv file extension.

How to Open a CSV File

Your computer will use Microsoft Excel as the default app for opening CSV files. However, you can open the file using a different program. Right-click the CSV file, go to Open With, and select one of the available programs. Additionally, you can open the file using Google Sheets.

If you want to open a CSV file with Notepad, the easiest way is to right-click the file and select Edit. Also, you can open a CSV file using Microsoft Word if you need more editing options.

How to Create a CSV File

If you want to export your data as a CSV file, for example in Excel, open the File menu and select Save as. Then, in the Save as window, choose CSV (Comma delimited) (*.csv) from the Save as type list.

Keep in mind that CSV files can’t have multiple sheets. When creating a CSV file, it will contain data from the active sheet.

Note: Do not change the file type by editing the extension because it will make the file unusable.

CSV Files Are Quite Useful

Hopefully, our article answered some of your questions about CSV files. While you may not work with CSV files that often, they are handy when you want to exchange data using programs that can’t communicate directly.

Comma-separated value (CSV) files are simplified versions of the type of spreadsheets you create with Excel and similar software. However, if you’re trying to share data with people who use different operating systems or programs, the CSV format offers a huge advantage in that most programs can read them easily.

In a nutshell, CSV files do what the name suggests: They contain values separated by commas (indicating columns) on one line, and different rows appear on different lines. You can create a CSV file with programs that include Excel, Google Sheets and OpenOffice Calc, as well as simple word processing programs like Notepad.

Creating CSV File With Excel

If you have Microsoft Office installed, you can easily import or export CSV files from Excel using the method described by Microsoft. To create one, you convert Excel to CSV (comma delimited) format, so you start by populating your spreadsheet in the way you ordinarily would. The only limitations ultimately come from the program that opens the file because some of the formatting options and features of Excel aren’t supported by basic text editing programs.

After you create the spreadsheet, go to “File” and choose “Save As.” Click the drop-down menu labeled “Save as type” in the window that appears and choose “CSV (comma delimited)” from the list. Give your file a name, browse to the correct location, and click “Save” to finish the process. You’ll see a couple of pop-ups, with the first warning that only the currently active sheet will be saved and the other reminding you about compatibility issues, but after this, the file is created.

If you're importing a text (.txt) file, Excel automatically opens the Import Text Wizard that leads you through the process of separating the existing data into a spreadsheet format.

Using OpenOffice or Google Sheets

As explained by ComputerHope, the process for creating a CSV file is basically the same as in Excel on both OpenOffice Calc and Google Sheets. Create your spreadsheet, adding information as you ordinarily would, and go to “File.” On OpenOffice Calc, you choose “Save As” and then edit the “Save as type” field in the same way as on Excel, only this time you choose “Text CSV” from the options that appear.

On Google Sheets, the saving process is automatic, but you can download the sheet in a specific format. Choose “Download as” and select “CSV (current sheet)” from the options that appear. Again, this serves as a reminder that only the currently active sheet will be downloaded in this way since CSV files don’t include multiple sheets by default. If you need to download more than one sheet, you need to do it separately in the same way.

Using Notepad

Because of the simplicity of the CSV format, you can make a CSV file even if you don’t have dedicated spreadsheet software but you want to share one with someone who does, using the method described by Adam the Automator. The two main rules you need to remember are that columns are separated by commas and rows are separated by new lines. So, for example, if you want to create a file that has two columns – one for the type of product and one for total sales – you would type:

Product, Total Sales

Staplers, $55.98

Toner, $358.20

Paper, $183.34

And so on. The only difficulty comes when you have something like an address that contains commas in a single field. In this case, you enclose the whole contents of the field in double quotation marks (“Street, Town”) and any commas within them will be read as actual commas and not as instructions to separate the field into multiple entries. You can do this on Notepad or any simple text editor.

When you save the file, select “Save as type,” but then choose “All Files” and type “.csv” at the end of the file name. This tells your computer how to read the file and avoids Notepad automatically saving it as a .txt file.

Can I create my own CSV file?

A CSV is a text file, so it can be created and edited using any text editor. More frequently, however, a CSV file is created by exporting (File > Export) a spreadsheet or database in the program that created it.

What program makes a CSV file?

Microsoft Excel is the most commonly used spreadsheet application for opening and editing CSV files. You can download a CSV file from many software programs.

How do I make a CSV file easy?

Creating CSV File With Excel After you create the spreadsheet, go to “File” and choose “Save As.” Click the drop-down menu labeled “Save as type” in the window that appears and choose “CSV (comma delimited)” from the list. Give your file a name, browse to the correct location, and click “Save” to finish the process.

How do I convert a PDF to CSV?

An easy solution is to first convert your PDF to a CSV file..
Launch Acrobat and open your PDF file..
Select the Export PDF tool from the menu bar on the right..
Select the Excel file format from the Convert To drop-down menu..
Select the Convert button..
Name your Excel file and select Save..