Working With CSV Files

As a programmer I work with a number of different file types. Each one has it’s own rules and structure. Whether I am writing a desktop application or just a script that makes my life easier, I love working with csv files.

Using CSV, or comma separated values, files makes it easy to program an application to interact with Microsoft Excel and many other ‘mainstream’ applications.

A few years back I wrote an application for a trucking company my wife was working for. They needed to grab a monstrous file from a government website and parse the data to be used by their CSR’s first thing every morning.

I tried numerous different ways to work with the data, but the easiest, and most efficient way, was to feed the parsed data into csv files. Using csv files allowed me transport huge amounts of data between the two websites and the CSR’s were free to use the same csv files in the application of their choice.

While working with CSV files, I tend to get my single and double quotes mixed up from time to time. I think it may have something to do with me being set in my ways as a Delphi programmer, and I forget that when using fields that contain quotes I have to escape the double quote.

Either way, I love working with csv files, as I have yet to find a different format that works so easily with so many different applications.

Technorati Tags: csv files, Delphi, programming
Sphere: Related Content

Posted on July 8, 2007
256 words · print

Comments are closed.

Leave a reply

Name (required)

Email (required)

Website

Comments

If this is your first time commenting, your comment will be held for moderation. Once your comment is approved by Slobokan, any future comments will not be held for moderation. Comments may be edited or deleted at the discretion of Slobokan, and may be re-produced at any time for the purpose of discussion, argument, or ridicule. This policy is not open for debate. If you do not agree, do not comment. It's that simple.