Hi,
I'm trying to download some excel files from FTP using FtpWebRequest, save on disk and then read excel data to put into database.
In the code above is my method to download files.
But i think there is something wrong with it. Because when I try to read the excel file, dataset is empty. But there are data into excel file.
I had to open the excel file, copy data to another excel file, "Save As", and read the new file. And it worked fine.
Can anyone see what is wrong in this code?
private void Download(string file)
{
FtpWebResponse response = null;
FileStream outputStream = null;
Stream ftpStream = null;
try
{
FtpWebRequest reqFTP;
string fileName = DiretorioDestino + "\\" + file;
FileInfo downloadFile = new FileInfo(fileName);
...
Go to the complete details ...