June 14, 2007

What is a CSV?

Have you ever gotten a weird file in an email attachment and wondered what it was? Or maybe a coworker or boss hands you a flash drive with some strange documents on it. Luckily, there are places online to find out about such documents. (Especially the ones that you double click on and nothing happens, or some weird error message about file associations or the program that created this file cannot be found or something.) Well, one such file you may have run across is the file.csv.

CSV stands for Coma Separated Variables. CSV files are files that contain spreadsheet or database style information. The individual portions of information are called variables. And the would-be columns are separated by a - you guessed it - coma!

You can open these data files in any text editor - like Notepad on Windows, TextEdit on Mac OS X, SimpleText on Classic Mac, or Emacs or vi on Linux. In these programs, you'll just see a lot of data separated by comas, and you'll see different line breaks. You'll probably see a lot of comas in a row, as well. These comas are place holders for empty columns on that row.

However, even though you can open and view the information in these files with a text editor, that's not primarily what the files are for. Let's face it. A bunch of stuff separated by comas is not easy to read, much less work with. Although, it is technically possible to do just that. The primary use of these files is to be opened in either a database or spreadsheet program, like MS Excel, FileMaker Pro, OpenOffice.org Calc, or even a CSV viewer. This allows you to see the data formated in columns and rows, where it will most likely make more sense than in coma form. The programs also allow you to easily adjust, add to, or use the data, using formulas, sorting tools, or just drag and drop. Things you can't do with them in a text editor.

This was a sponsored post.

Add to any service

No comments: