ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Ftp from within excel (https://www.excelbanter.com/excel-programming/306204-re-ftp-within-excel.html)

Amedee Van Gasse[_3_]

Ftp from within excel
 
Rich Cooper wrote:

Hey i have figured out how to have excel connect to an ftp by
creating a txt file with ftp commands and a batch file to execute
them. I want to know if there is a way to tell excel to keep the
communication open and download a file when it is ready. What
happens is excel uploads a file, a process program on my server
extracts data from the csv excel uploaded and puts that data into a
sql server. Then sql generates a new csv and puts it into a
directory for it to be downloaded. I want to know how to tell the
ftp connection when that file is done and then to start download. I
can tell it to download a file but i have to know that file is there
and ready for download.


Since you don't know when your new file will be ready, perhaps you
should use the FTP GET command in a loop? Try GETting it until you get
a local file? If your file is not ready yet, your FTP connection won't
do a thing, it will just say that the file is not there.

But wouldn't it be easier to connect to the SQL server directly? Excel
can do that!

--
Amedee Van Gasse using XanaNews 1.16.3.1
If it has an "X" in the name, it must be Linux?
Please don't thank me in advance. Thank me afterwards if it works or
hit me in the face if it doesn't. ;-)

Rich Cooper[_5_]

Ftp from within excel
 
how can excel connect directly to sql server?
"Amedee Van Gasse" wrote in message
...
Rich Cooper wrote:

Hey i have figured out how to have excel connect to an ftp by
creating a txt file with ftp commands and a batch file to execute
them. I want to know if there is a way to tell excel to keep the
communication open and download a file when it is ready. What
happens is excel uploads a file, a process program on my server
extracts data from the csv excel uploaded and puts that data into a
sql server. Then sql generates a new csv and puts it into a
directory for it to be downloaded. I want to know how to tell the
ftp connection when that file is done and then to start download. I
can tell it to download a file but i have to know that file is there
and ready for download.


Since you don't know when your new file will be ready, perhaps you
should use the FTP GET command in a loop? Try GETting it until you get
a local file? If your file is not ready yet, your FTP connection won't
do a thing, it will just say that the file is not there.

But wouldn't it be easier to connect to the SQL server directly? Excel
can do that!

--
Amedee Van Gasse using XanaNews 1.16.3.1
If it has an "X" in the name, it must be Linux?
Please don't thank me in advance. Thank me afterwards if it works or
hit me in the face if it doesn't. ;-)





All times are GMT +1. The time now is 10:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com