How to create a CSV file: 12 steps

Table of contents:

How to create a CSV file: 12 steps
How to create a CSV file: 12 steps
Anonim

CSV files (stands for “Comma Separated Values”) allow you to save text data in table format, which is very convenient when working with large databases. You can create a CSV file using Microsoft Excel, OpenOffice Calc, Google Sheets, and Notepad.

Steps

Method 1 of 2: Microsoft Excel, OpenOffice Calc, and Google Sheets

Create a CSV File Step 1
Create a CSV File Step 1

Step 1. Open a new spreadsheet in Microsoft Excel, OpenOffice Calc, or Google Sheets

If you need to convert an existing table to CSV format, then go to step 4

Create a CSV File Step 2
Create a CSV File Step 2

Step 2. List any headings or field names in the first row of cells at the top of the table

For example, when entering data for sales items, enter “Product Name” in cell A1, “Product Price” in cell B1, “Product Description” in cell C1, and so on.

Create a CSV File Step 3
Create a CSV File Step 3

Step 3. Enter data into the table below each column

Continuing with the example from the previous step 2, enter the product name in cell A2, the price in cell B2, and a description in cell C2.

Create a CSV File Step 4
Create a CSV File Step 4

Step 4. Enter all the data in the table, click "File" and select "Save As"

In Google Sheets, choose File> Download As.

Create a CSV File Step 5
Create a CSV File Step 5

Step 5. Select “CSV” from the File Type drop-down menu

Create a CSV File Step 6
Create a CSV File Step 6

Step 6. Enter a name for the CSV file and click “Save”

The CSV file is ready and the commas will be added automatically to separate each field.

Method 2 of 2: Notepad

Create a CSV File Step 7
Create a CSV File Step 7

Step 1. Open Notepad, type the field names on the first line and separate them with commas

So, if you need to enter data for products for sale, type the following on the first line: “name, price, description”. There should be no spaces between words.

Create a CSV File Step 8
Create a CSV File Step 8

Step 2. Print the data on the second line in the same format as the field names on the first line

If you use the example from step 1, enter the title, price, and description of the item. For example, for tennis balls, you might specify “tennis, 20, sport”.

Create a CSV File Step 9
Create a CSV File Step 9

Step 3. Continue entering data for each individual item on each subsequent line

If any field is left blank, be sure to use a comma, otherwise the remaining fields will be shifted by one.

Create a CSV File Step 10
Create a CSV File Step 10

Step 4. Click “File” and select “Save”

Create a CSV File Step 11
Create a CSV File Step 11

Step 5. Enter the file name and add the extension “.csv” after the file name in the “File name” line

Create a CSV File Step 12
Create a CSV File Step 12

Step 6. Click “Save”

You managed to create a CSV file using the Notepad editor.

Popular by topic