csv problem

  • Thread starter Thread starter angus
  • Start date Start date
A

angus

Dear All,

Are there any library, in .net to write/read csv file?

Thank you

Regards,
Angus
 
angus said:
Dear All,

Are there any library, in .net to write/read csv file?

Assuming your CSV does not contain character sequences that need special
handling, e.g. escaped content like

"Hello, World",Foo,Bar

you can easily implement the required functionality by reading the CSV file
line by line and calling String.Split() per line.

Cheers,
 
look in MSDN magazine - they had an article on this, implementing an
XMLReader that takes CSV as input and outputs XML elements
 
Hi Angus,

the best solution for csv is using opennetcf's implementation: go to
www.opennetcf.org and download it, it provide a dataprovider for it.

Cheers,
 
"Hello, World",Foo,Bar

you can easily implement the required functionality by reading the CSV file
line by line and calling String.Split() per line.

In your example, if i call

String.Split(",")

then,

Hello
World
Foo
Bar

will be return, instead of

Hello, World
Foo
Bar

am i right?
 
angus said:
"Hello, World",Foo,Bar

you can easily implement the required functionality by reading the
CSV file line by line and calling String.Split() per line.

In your example, if i call

String.Split(",")

then,

Hello
World
Foo
Bar

will be return, instead of

Hello, World
Foo
Bar

am i right?

Actually,
"Hello
World!"
Foo
Bar

Just to clarify, I chose the example to demonstrate when String.Split()
won't work.

Cheers,
 
Back
Top