tags:

views:

73

answers:

2

i have a url when i click on it i get windows asking me what to open it in and it recommends excel.

I now want to read this csv data dynamically in a c# application. what is the best way of getting csv data from Http Request to a url?

+2  A: 

For HTTP, use either the WebClient or WebRequest/WebResponse classes.

For parsing the CSV file itself, these suggestions should help.

Tim Robinson
A: 

Once you get the data you can save it on the local drive. From there, you should be able to use the Jet provider for OLEDB in .NET to read the CSV file. The connection string will look something like this:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended
Properties=""text;HDR=Yes;FMT=Delimited"""
casperOne