Skip to main content

What is a CSV file and how to create it?

You might have come across this word CSV file. You have needed it somewhere; you might have read like this “Provide a CSV file.” Or you may just have read it on internet. So what a CSV file is?

CSV is a short form of comma separated values. It is any file containing text that is separated by comma. 
e.g
Text can also be separated with any other special character. Creating a CSV file is as simple as creating a text file. It can be created in any text editor. It is mostly created using Microsoft Excel or Open Office Calc. We will see how to create a CSV file using a text editor and Microsoft Excel.

Notepad (or any text editor):

To create a CSV file in a text editor open a new text editor program, such as Notepad. Once open write the text data you wish the file to contain and separate each field or column of data with a comma and each row with a new line

Title1,Title2,Title3
one,two,three
example1,example2,example3

As an example, if you were to create a text file with the above data, and save it as a CSV file, each column is created by each comma and each row is created by each new line. Therefore, the above data if opened in a spreadsheet program such as Microsoft Excel would create a table similar to the below example.

Title1
Title2
Title3
one
Two
Three
example1
example2
example3

If the data you're planning to use in your CSV file already has comma's, such as an address; it's easier to use a different delimiter to separate each of the values. For example, in the below CSV file we will be creating names and addresses for labels that will be printed and are separating each name and address label with a tilde character. Alternatively a better solution would be to have the address, city, and state in their own column.

Name
Street Address
City, State ZIP Code
~Mr John Smith
123 Fake address
Salt Lake City, Utah 89110
~Mrs Jane Doe
586 Another fake
Delta, Utah 84624
~Bill White
123 N Fake Street
St Anthony, Idaho 83445



Microsoft Excel:

Open Microsoft Excel and the file you wish to save as a CSV file. For example, below is the data contained in our example Excel worksheet.

Item
Cost
Sold
Profit
Keyboard
$10.00
$16.00
$6.00
Monitor
$80.00
$120.00
$40.00
Mouse
$5.00
$7.00
$2.00


Total
$48.00

Once open, click File, choose the Save As option, and as the Save as type: select the CSV (Comma delimited) (*.csv) option. Once saved, if you were to open the CSV file in a text editor, such as Notepad, the CSV file should resemble the below example.

Item,Cost,Sold,Profit
Keyboard,$10.00,$16.00,$6.00
Monitor,$80.00,$120.00,$40.00
Mouse,$5.00,$7.00,$2.00
,,Total,$48.00

Additional Tip:

You can also create a CSV file using Google Docs. Here is how?
Open Google Docs and the Spreadsheet file you wish to save as a CSV file. Click File, Download as, and then select CSV (current sheet).

Popular posts from this blog

End of Engineering and Begining of Web Raga

Finally my exams are over and here is the end of College Days. I don't know whether I will go for further studies or not, but surely I will try to do things out of the box.       We have started our work at e-Lightening Technologies and clients are just flowing to get their web presence. Definitely condition has been completely changed, two years back we used to convince each and every person coming to us why they should have a website for their business. But today people have agreed with this fact that if they want to be ahead of their competitors, they must have their online presence.  As far as this website is concerned, I have many plans. Soon we are going to hire 3 more Tech Bloggers to write for us. We are also going to have a seperate office for this website. We are now open for Guest Blogging. If you want to write for this website, please contact us using the contact form available on contact us page . From 14th June 2012, we will be p...

Recovering Deleted Files, Pictures & Videos

  So many times we accidently delete some important files, pictures or videos. Sometimes we loose files because of unexpected system failure  ( ultimately causing system format). We can get our deleted files back using Recovery Softwares/Utilities.  Even though a file was deleted there is a good chance that contents of the file are still around.  When a file is deleted the contents of the file are not removed. Only a pointer to the file in the file system table is deleted.   It is very important to immediately stop writing to the storage device that previously contained your files/pictures so that the old file contents are not overwritten.  For example, don’t take any more pictures with your digital camera because new pictures will overwrite the deleted files. HOW TO RECOVER DELETED FILES???? Step1: You will need to use a utility to recover your lost files. I like to use a free ut...

Google's this Doodle is just Awwwsome!!!!

In celebration of Robert Moog’s 78th birthday, Google has created an epic Google Doodle to honor founder of Moog Music , pioneer of electronic music , best known as the inventor of the Moog synthesizer .The Doodle presents an interactive Moog synthesizer . Users can adjust dials on the synthesizer, turn switches on and off and play sounds on the keyboard. They can also record and playback their creations. Don't miss playing this with your keyboard!!!! Google is also showing a regular link of Google+ to share whatever music you have created.