从FTP服务器CSV文件填充数据表

时间:2017-09-27 10:26:36

标签: c# csv ftp-server import-csv

从ftp服务器csv文件中填充c#中的数据表。我能够读取csv文件,但它提供的内容是编码格式,如'\ 000 \ 3000'等。所以请帮助我解决这个问题。提前谢谢。

逻辑:

 string ftpPath = (@"****.csv");
        FtpWebRequest reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpPath));
        reqFTP.UsePassive = true;
        reqFTP.UseBinary = true;
        reqFTP.EnableSsl = false;
        reqFTP.Credentials = new NetworkCredential("user", "password");
        reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
        reqFTP.KeepAlive = true;
        reqFTP.Proxy = WebRequest.DefaultWebProxy;
        FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
        Stream responseStream = response.GetResponseStream();
        List<string> entries = new List<string>();

0 个答案:

没有答案