PDF download Download Article
An easy-to-follow tutorial on making CSV files
PDF download 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.
Method 1
Method 1 of 2:

Using a Spreadsheet Application

PDF download Download Article
  1. 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]
    • If you want to convert an existing spreadsheet to CSV format, skip to step #4.
  2. 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
  3. 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.
  4. If using Google Sheets, this option will read as “File > Download as.”[2]
  5. You have now created a CSV file, and commas will automatically be added to the file to separate each field.[3]
  6. Advertisement
Method 2
Method 2 of 2:

Using a Text Editor

PDF download Download Article
  1. Open Notepad on your PC or TextEdit on your Mac. Because CSV files are actually just plain text files in a specific comma-separated format, you can use your computer's built-in text editor to create one.[4]
  2. 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.
  3. 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]
  4. If leaving any fields empty, make sure you include the comma, or the remaining fields will be off by one.
  5. Alternatively, press Ctrl + S on your keyboard if you're using a PC, or Cmd + S on a Mac.[6]
  6. 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.
  7. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I execute a CSV file?
    Community Answer
    Community Answer
    CSV 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!

You Might Also Like

Get a Calendar on Your DesktopGet a Calendar on Your Desktop
Migrate from Evernote to OneNote Easily Import Data from Evernote to OneNote
Add a Check Mark to a Word Document7 Simple Ways to Add a Check Mark to a Word Document
Open a Pages File on PC or Mac3 Quick Ways to Open a Pages File on PC or Mac
Redact in Word Redact or Black Out Text in Word: 3 Ways
Open WordPad in Windows 10Open WordPad in Windows 10
Open CSV Files View, Open, and Edit a .CSV on Windows or Mac
Use Notepad++Use Notepad++
Disable or Delete Recent Document List in Microsoft Word or Excel Delete Recent Documents in Microsoft Word or Excel
Change the User Interface Language of LibreOfficeChange the User Interface Language of LibreOffice
Format a Word Document to Look ProfessionalFormat a Word Document to Look Professional
Use LibreOfficeA Complete Beginner's Guide to Use LibreOffice
Office Pranks40 Funny Pranks to Make The Whole Office Laugh
Open NotepadOpen Notepad
Advertisement

About This Article

Darlene Antonelli, MA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for wikiHow. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 434,751 times.
How helpful is this?
Co-authors: 8
Updated: December 10, 2024
Views: 434,751
Categories: Office
Thanks to all authors for creating a page that has been read 434,751 times.

Is this article up to date?

Advertisement