Download Article
An easy-to-follow tutorial on making CSV files
Download Article
Do you need to create a CSV file for your data? A CSV file, which is a “comma-separated values” file, allows you to save your data in a table-structured format, which is useful when importing data into databases and web applications. This wikiHow article teaches you how to create CSV files using Microsoft Excel, OpenOffice Calc, Google Sheets, and in a text editor.
Things You Should Know
- Using a spreadsheet application like Excel, Google Sheets, or OpenOffice Calc is the easiest way to make CSV files.
- If you can't use any of those programs, you can use a text editor like Notepad or TextEdit.
- In a spreadsheet program, go to File > Save As > File Type > CSV . In a text editor, go to "File > Save As > File Type > All Files" and name the file with .csv at the end.
Steps
-
Open a new spreadsheet in Microsoft Excel , OpenOffice Calc, or Google Sheets . You can use any spreadsheet software to easily convert table data to CSV files. [1] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
- If you want to convert an existing spreadsheet to CSV format, skip to step #4.
-
Type each of your headers, or field names into the cells located in row 1 at the top of the spreadsheet. For example, if entering data for items you’re selling, type “Item Name” into cell A1, “Item Price” into cell B1, “Item Description” into cell C1, and so on.Advertisement
-
Enter your data into the spreadsheet under each column as needed. Using the example outlined in step #2, write the item name in cell A2, the item’s price in cell B2, and the item’s description in cell C2.
-
Click File and select Save As . If using Google Sheets, this option will read as “File > Download as.” [2] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
-
Select CSV under the “Save as type” dropdown menu.
-
Type a name for your CSV file, then click Save . You have now created a CSV file, and commas will automatically be added to the file to separate each field. [3] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
Advertisement
-
Type your field names separated by commas onto the first line. For example, if entering data for items you’re selling, type the following onto the first line: “name,price,description.” There must be no spaces between items.
-
Type your data onto the second line, using the same format as your field names on the first line. Using the example outlined in step #1, write the actual item name, followed by the item’s price and description. For example, if selling baseballs, write “baseball,5.99,sports.” [5] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
-
Continue typing your data for each individual item onto each subsequent line. If leaving any fields empty, make sure you include the comma, or the remaining fields will be off by one.
-
Click File and select Save . Alternatively, press Ctrl + S on your keyboard if you're using a PC, or Cmd + S on a Mac. [6] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
-
Save your file. To do this, click the drop-down menu next to Save as type and select All Files . Next, type a name for your file and end it with .csv .
- Click Save . You have now created a CSV file that you can easily import into a spreadsheet program, database, or web application.
Advertisement
Community Q&A
Search
-
QuestionHow do I execute a CSV file?Community AnswerCSV files are not executables, so you can’t “run” it like an app. These files are usually read by programs that use it as data.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
References
- ↑ https://support.microsoft.com/en-us/office/use-excel-to-open-or-save-a-worksheet-in-the-opendocument-spreadsheet-ods-format-c7114baa-f08a-49eb-aefd-f5d61ed347cd
- ↑ https://support.microsoft.com/en-us/office/save-a-workbook-to-text-format-txt-or-csv-3e9a9d6c-70da-4255-aa28-fcacf1f081e6
- ↑ https://support.microsoft.com/en-us/office/import-or-export-text-txt-or-csv-files-5250ac4c-663c-47ce-937b-339e391393ba
- ↑ https://support.apple.com/guide/textedit/open-documents-txte51413d09/mac
- ↑ https://support.microsoft.com/en-us/office/create-or-edit-csv-files-to-import-into-outlook-4518d70d-8fe9-46ad-94fa-1494247193c7
- ↑ https://support.microsoft.com/en-us/windows/help-in-notepad-4d68c388-2ff2-0e7f-b706-35fb2ab88a8c
About This Article
Thanks to all authors for creating a page that has been read 434,751 times.
Advertisement