ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open file on password-protected FTP site (https://www.excelbanter.com/excel-programming/396548-open-file-password-protected-ftp-site.html)

pdberger

Open file on password-protected FTP site
 
Greetings --
I have one workbook that pulls reference data from another. I want many
users around the country to have their 'client' workbooks, opening up the
'source' workbook with the reference data stored centrally. That way, I only
need to update the 'source' workbook once.
I've written code to pull the reference data when the 'target' workbook is
opened. I'm now ready to move the 'source' workbook to the central location.
My IT guy tells me the best way is to put it on an FTP site, which he has
set up. However, that site is password-protected (although the file won't
be).
How do I write the code to get past the protection and open the file to
establish the links? Here's some sample vitals:

ftp path & file name: ftp://petersite.com/test.xls
site login: peter
password: coffee

Or should I be trying to store the file differently to make access more
effective?
Thanks in advance.

Vergel Adriano

Open file on password-protected FTP site
 
try a URL like this:



you need to be careful though because you will be exposing the username and
password for everyone to see...

--
Hope that helps.

Vergel Adriano


"pdberger" wrote:

Greetings --
I have one workbook that pulls reference data from another. I want many
users around the country to have their 'client' workbooks, opening up the
'source' workbook with the reference data stored centrally. That way, I only
need to update the 'source' workbook once.
I've written code to pull the reference data when the 'target' workbook is
opened. I'm now ready to move the 'source' workbook to the central location.
My IT guy tells me the best way is to put it on an FTP site, which he has
set up. However, that site is password-protected (although the file won't
be).
How do I write the code to get past the protection and open the file to
establish the links? Here's some sample vitals:

ftp path & file name:
ftp://petersite.com/test.xls
site login: peter
password: coffee

Or should I be trying to store the file differently to make access more
effective?
Thanks in advance.


pdberger

Open file on password-protected FTP site
 
Interesting! I tried it, and it failed. But then I just tried

Workbooks.open Filename:="petersite.com/test.xls"

and it opened fine! Got right past the password protection. Hmmmm.

Thanks for pointing me in the right direction.


"Vergel Adriano" wrote:

try a URL like this:



you need to be careful though because you will be exposing the username and
password for everyone to see...

--
Hope that helps.

Vergel Adriano


"pdberger" wrote:

Greetings --
I have one workbook that pulls reference data from another. I want many
users around the country to have their 'client' workbooks, opening up the
'source' workbook with the reference data stored centrally. That way, I only
need to update the 'source' workbook once.
I've written code to pull the reference data when the 'target' workbook is
opened. I'm now ready to move the 'source' workbook to the central location.
My IT guy tells me the best way is to put it on an FTP site, which he has
set up. However, that site is password-protected (although the file won't
be).
How do I write the code to get past the protection and open the file to
establish the links? Here's some sample vitals:

ftp path & file name:
ftp://petersite.com/test.xls
site login: peter
password: coffee

Or should I be trying to store the file differently to make access more
effective?
Thanks in advance.



All times are GMT +1. The time now is 11:53 PM.

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