I am trying to read an excel file from an FTP Server and store the datas in a list. Excel file is reading from an FTP Server but data is coming
This is my code
 static void Main(string[] args)
    {
        //Listing all files from a folder
        string filename = getFileList("ftp://ftp.demosite.com/demoFolder/", "username", "password");
        //Here we know the file name
        FtpWebRequest reqFTP = (FtpWebRequest)FtpWebRequest.Create("ftp://ftp.demosite.com/demoFolder/"+filename);
        reqFTP.UsePassive = false;
        reqFTP.UseBinary = true;
        reqFTP.Credentials = new NetworkCredential("username", "password"); 
        reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
        reqFTP.Proxy = GlobalProxySelection.GetEmptyWebProxy();
        FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
        Stream responseStream = response.GetResponseStream();
        // for excelread
        StreamReader reader = new StreamReader(responseStream);
        string[] allLines = reader.ReadToEnd().Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
        // for textfile read
        //TextReader tmpReader = new System.IO.StreamReader(responseStream);
        //string fileContents = tmpReader.ReadToEnd();
        Console.WriteLine("Now writing from file....");
        foreach (var item in allLines)
        {
            Console.WriteLine(item);                
        }
        Console.WriteLine("all file content is printed....");
        Console.ReadKey();
    }
and the data is coming in this format: Current O/P Format
Please Help! Thank You.
 
     
    