Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files from website?
I use Excel 2007 with VBA at work. We also have a company
website that, I believe, is an Intranet only website. Is it possible to use VBA to extract images from our company website and copy them to a local folder? For example, if I type "http://blue/our_site/img/444.001.jpg" in my Internet Explorer browser at work, an image will load on my browser. Are there VBA functions that take a URL as above and copy the file to a target location?? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files from website?
Robert Crandal wrote:
I use Excel 2007 with VBA at work. We also have a company website that, I believe, is an Intranet only website. Is it possible to use VBA to extract images from our company website and copy them to a local folder? For example, if I type "http://blue/our_site/img/444.001.jpg" in my Internet Explorer browser at work, an image will load on my browser. Are there VBA functions that take a URL as above and copy the file to a target location?? Does it *need* to be VBA? While VBA certainly can do it, it's much simpler to use a download manager like wget or curl from the command line: cd "local folder" wget http://blue/our_site/img/444.001.jpg -- You seldom learn the names of the truly wealthy and powerful. You see only their spokesmen. The political arena makes a few exceptions to this but does not reveal the full power structure. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files from website?
I cant install "wget" or "curl" at work. I thought maybe VBA
had some functions for downloading files from a website. "Auric__" wrote in message 44.100... Robert Crandal wrote: Does it *need* to be VBA? While VBA certainly can do it, it's much simpler to use a download manager like wget or curl from the command line: cd "local folder" wget http://blue/our_site/img/444.001.jpg |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files from website?
Robert Crandal wrote:
"Auric__" wrote in message 44.100... Robert Crandal wrote: Does it *need* to be VBA? While VBA certainly can do it, it's much simpler to use a download manager like wget or curl from the command line: cd "local folder" wget http://blue/our_site/img/444.001.jpg I cant install "wget" or "curl" at work. I thought maybe VBA had some functions for downloading files from a website. Well... if it was me, I'd just run wget from a USB drive... if it was me. But since you're not me, you can try this: Declare Function URLDownloadToFile Lib "urlmon" _ Alias "URLDownloadToFileA" (ByVal pCaller As Long, _ ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Sub grabfile() URLDownloadToFile 0, "http://blue/our_site/img/444.001.jpg", _ "C:\dir\you\have\write\access\to\444.001.jpg", 0, 0 End Sub If that doesn't work, there's more than one way to skin this cat. Google for "automate internet explorer vb", without quotes. -- In the meantime why let the worry mice gnaw at one's mind? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files from website?
Perfect, that worked very nicely for me. That's exactly what I
was looking for! Thank you very much! "Auric__" wrote in message 44.100... Robert Crandal wrote: But since you're not me, you can try this: Declare Function URLDownloadToFile Lib "urlmon" _ Alias "URLDownloadToFileA" (ByVal pCaller As Long, _ ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Sub grabfile() URLDownloadToFile 0, "http://blue/our_site/img/444.001.jpg", _ "C:\dir\you\have\write\access\to\444.001.jpg", 0, 0 End Sub |
#6
|
|||
|
|||
Cho thuê sân khấu - Thi công lắp dựng sân khấu -LH 0907 150 220 Đạt Phương - Đơn vị chuyên cung cấp, cho thuê âm thanh - ánh sáng - cung cấp, lắp đặt sân khấu phục vụ sự kiện chuyên nghiệp. ... Chuyên thiết kế, cung cấp v* lắp đặt hệ thống thiết bị âm thanh, ánh sáng, không gian, ...sân khấu. Liên hệ Mr Đạt 0911 000 222 [center] |
#7
|
|||
|
|||
Huyen Tâm Bui :v. Mới chỗ vợ xong gặp trưa đ*p đấy. Gam em phá Nguyen chị M*p Thu gọi Jessica Đang đi chồng cả kêu nay Gấu ăn Gọi Nguyen Bùi về
Bảo Hiểm Chăm sóc sức khỏe |
#8
|
|||
|
|||
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
rewrite excell files on website | Excel Discussion (Misc queries) | |||
Using Excel to download a batch of files from a website | Excel Programming | |||
Downloading excel files from a website using VBA | Excel Programming | |||
need to upload copied excel files to admin page on website | Excel Discussion (Misc queries) | |||
Copy from website to Excel | Excel Programming |