Home |
Search |
Today's Posts |
#1
|
|||
|
|||
[HELP] Download images from a list of urls (in excel sheet) to my local disk
Hi, i have a sheet with a list of urls of some pictures:
http://www.mysite.com/cbcuu/$5Gbewh60.jpg http://www.mysite.com/cbcuu/$"£%"£wh60.jpg http://www.mysite.com/cbcuu/$rf34ewh60.jpg http://www.mysite.com/cbcuu/$5G$£h60.jpg http://www.mysite.com/cbcuu/$5G65h60.jpg http://www.mysite.com/cbcuu/$5G"£££h60.jpg http://www.mysite.com/cbcuu/$5Gbtgtgh60.jpg I need a tool that will automatically connect to the url and download the images in a folder. So now i have new urls like these: C:\User\Anto\Pictures\$5Gbewh60.jpg C:\User\Anto\Pictures\$"£%"£wh60.jpg etc. Then the tool must re-insert the new urls in the excel sheet near the old urls. I hope this can be done in excel. Thanks very much and sorry for my not-perfect english. Hope you have a nice day. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
[HELP] Download images from a list of urls (in excel sheet) tomy local disk
Il 25/09/2012 10:12, anto888 ha scritto:
Hi, i have a sheet with a list of urls of some pictures: http://www.mysite.com/cbcuu/$5Gbewh60.jpg http://www.mysite.com/cbcuu/$"£%"£wh60.jpg http://www.mysite.com/cbcuu/$rf34ewh60.jpg http://www.mysite.com/cbcuu/$5G$£h60.jpg http://www.mysite.com/cbcuu/$5G65h60.jpg http://www.mysite.com/cbcuu/$5G"£££h60.jpg http://www.mysite.com/cbcuu/$5Gbtgtgh60.jpg I need a tool that will automatically connect to the url and download the images in a folder. So now i have new urls like these: C:\User\Anto\Pictures\$5Gbewh60.jpg C:\User\Anto\Pictures\$"£%"£wh60.jpg etc. Then the tool must re-insert the new urls in the excel sheet near the old urls. I hope this can be done in excel. Thanks very much and sorry for my not-perfect english. Hope you have a nice day. Private 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 DownloadFilefromWeb() Dim SPath As String, ret As Long, Addr As Range, v As Range Set Addr = Range("Sheet11!A2:A9") SPath = "C:\MyDir\MySubDir\" For Each v In Addr ret = URLDownloadToFile(0, v, SPath & Mid(v, InStrRev(v, "/") + 1), 0, 0) v.Offset(, 1) = IIf(ret, "Error", "Ok") Next End Sub Set the sub for your range and your path. Hi, E. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy .xls betwen local disk and https:// location | Excel Programming | |||
VBA to save a web page to local disk | Excel Discussion (Misc queries) | |||
Download existing file from floppy disk excel but said unformated | Excel Discussion (Misc queries) | |||
Download files from 3.5 disk in excel but system said disk need fo | Excel Discussion (Misc queries) | |||
Inconsistent Behavior on Web vs. Local Disk | Excel Programming |