Import / Export CSV.

S

shapper

Hello,

I have a CSV file with 8 fields (8 columns).
I need to import it and fill a IList<Task> where each Task is a row in
the CSV file being the columns its properties.

All Task properties are String except for one that is DateTime so in
that case I need to parse it.

Does anyone knows a script for this?
And what about a Fluent script? Something like:

csvFile.Column["1"].For(t => t.Name) ...

Well just an idea.

I've never worked with CSV files so ...

The file will not have more than 200 rows. And in most cases will have
around 10/20.

Thank You,
Miguel
 
R

Rich P

I've used http://www.codeproject.com/KB/database/CsvReader.aspx in the
past and it has worked well for what I needed. Perhaps you can use it or
it can be a good starting point for you.
<

Greetings,

I downloaded this sample but get a compile error that says it is missing
the nunit.framework assembly. I downloaded both zip files and opened
both of them. I am build errors (sometimes 364 and sometimes over 450
- I guess depending on which sub project I am in) and in the

LumenWorks.Framework.Tests.Unit project

the reference tab says it is missing a reference to

nunit.framework

I looked for that library in all of the zip folders but did not find
anything. Is there somewhere I could get this library?

Thanks,

Rich
 
S

shapper

I've usedhttp://www.codeproject.com/KB/database/CsvReader.aspxin the
past and it has worked well for what I needed. Perhaps you can use it or
it can be a good starting point for you.
<

Greetings,

I downloaded this sample but get a compile error that says it is missing
the nunit.framework assembly.  I downloaded both zip files and opened
both of them.  I am build  errors (sometimes 364 and sometimes over 450
- I guess depending on which sub project I am in) and in the

LumenWorks.Framework.Tests.Unit  project

the reference tab says it is missing a reference to

nunit.framework

I looked for that library in all of the zip folders but did not find
anything.  Is there somewhere I could get this library?

Thanks,

Rich

*** Sent via Developersdexhttp://www.developersdex.com***

Hi,

I also found the following in codeplex:
http://kbcsv.codeplex.com/

What do you think? It seems ok ... not?

Thanks,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top