tags:

views:

38

answers:

2

hi there,

i'm supposed to convert a csv file into a nice report for bosses.

At first, I didn't even think of programming at all. As a power user of both excel and word, i thought i could get the job done in no time with this, maybe even without any stupid ms macro at all...

it turns out i was wrong.

so i'm gonna have to program something to get the job done. and it's gotta be in C#

since i'm a huge fan of the not-invented-here and other database-to-object approach, i once used to work with rake/ruby/ror/active_record, and while returnig on C# i found subsonic classes very convenient to get a simple job done quickly and easily change things later on. Espacially its simplerepository design is very good. That was about half a year ago.

Now i have this simple question, I couldn't find anything related to CSV in subsonic site, but subsonic website says to ask stackoverflow instead, so here we are :

can i use subsonic to read data in a CSV file? (as opposed to a regular sqlite or mysql database)

+1  A: 

Subsonic is an ORM, not a library to read CSV files. If I were you I would use this library to read the csv file in memory: A Fast CSV Reader

Once you read the file you can later use Subsonic to save it to database and perform queries (if you need to).

Giorgi
yeah i saw that one already. but as far as i remember, subsonic could natively read sqlite dababases. so i figured maybe subsonic has some sort of a csv driver included too.I would rather have a dependance with subsonic as opposed to tat other class.the reason for that is that i trust subsonic to acheive other tass and i was welcoming to idea to get more comfy with subsonic in general thanks to this simple project + show subsonic to my friends at work through that project
subsonic supports sqlite because it is a database while csv is just a file holding data.
Giorgi
+1  A: 

Im using http://www.filehelpers.com/. Its an easy to use .NET Lib. You can define im/export formats (as xml or attributes class) for delimited or fixed length dat files.

isepise