views:

40

answers:

2

I am working on an application which has to retrieve data from a CSV file online and display it with a click of a button. However, how can I automatically store the CSV file in a safe place where I can access the information? I am working with Visual Studio C#.

Thank you.

A: 

The FileHelpers are a free and easy to use .NET library to import/export data from fixed length or delimited records in files, strings or streams.

The FileHelpers Library
http://www.filehelpers.com/

Robert Harvey
+1  A: 

You want to use the WebClient class to make an http request to the server for the csv file. It should read the whole contents as a string which you can then parse and manipulate at your leisure.

http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.100).aspx

Use System.IO.File to write the contents to a file.

http://msdn.microsoft.com/en-us/library/system.io.file.aspx

Doobi