![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Download Website to Excel Sheet If I have opened Website, how download info to Excel Sheet with Vba? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Download Website to Excel Sheet kosser wrote: Quote: > If I have opened Website, how download info to Excel Sheet with Vba? > There are (at least ) two answers to this: 1: If you just want to download the page, then you can use ms' "Microsoft.XMLHTTP" object to download the page to a string array. Then you can sift through the page (text) to get what you want. There are numerous examples of how to do this in the archives of this ng. 2: If you just want to pick up some specific data off the page (for example, to get a stock quote) then you could use msXL's built-in "web query" feature. This is probably discussed in your XL help file, and if not then you can read about it on msdn: http://office.microsoft.com/en-us/ex...548481033.aspx cheers, jw ____________________________________________________________ You got questions? WE GOT ANSWERS!!! ..(but, no guarantee the answers will be applicable to the questions) |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Download Website to Excel Sheet "mr_unreliable" <kindlyReplyToNewsgroup@xxxxxx> wrote in message news:ODRAFWpyJHA.1492@xxxxxx Quote: > kosser wrote: Quote: >> If I have opened Website, how download info to Excel Sheet with Vba? > hi Kosser, > > There are (at least ) two answers to this: > > 1: If you just want to download the page, then you can use > ms' "Microsoft.XMLHTTP" object to download the page to a > string array. Then you can sift through the page (text) > to get what you want. There are numerous examples of how > to do this in the archives of this ng. > > 2: If you just want to pick up some specific data off the > page (for example, to get a stock quote) then you could use > msXL's built-in "web query" feature. This is probably discussed > in your XL help file, and if not then you can read about it > on msdn: > > http://office.microsoft.com/en-us/ex...548481033.aspx > > > cheers, jw > ____________________________________________________________ > > You got questions? WE GOT ANSWERS!!! ..(but, no guarantee > the answers will be applicable to the questions) Thanks jw for responding. Earlier I was downloading with web query , but website owner put "captha test" in website and this problem is insolvable . Your variant1 (Microsoft.XMLHTTP) is what I am interesting. But i very noobie for VBA (my english too very bad) and need help. I was meet diferent code where used manipulations with URL, but i dont need this way. Need simple way: opened website load all info- copy all text to excel sheet. (Not hyperlinks, not controlls, not pictures, not txt fail). Private Sub CommandButton1_Click() 'Reference needed for Microsoft Internet Controls Dim SWs As SHDocVw.ShellWindows Dim i As Long, Adres As String Set SWs = New SHDocVw.ShellWindows For i = SWs.Count - 1 To 0 Step -1 Adres = CStr(SWs(i).LocationURL) If Adres Like "http*" Then ' Something like this: ' ActiveWebsite.Select.All ' ActiveWebsite.Copy ' Wbk("Data.xls").Activate ' Wbk("Data.xls").Sheet1.Open ' Selection.Paste End If Next i Range("A1").Select Set SWs = Nothing End Sub Or some sample code using: Microsoft.XMLHTTP |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Download Website to Excel Sheet If the site uses a method like CAPTCHA then xmlhttp isn't going to help you. Tim "kosser" <kosser@xxxxxx> wrote in message news:uUpwVZqyJHA.5684@xxxxxx Quote: > > "mr_unreliable" <kindlyReplyToNewsgroup@xxxxxx> wrote in message > news:ODRAFWpyJHA.1492@xxxxxx Quote: >> kosser wrote: Quote: >>> If I have opened Website, how download info to Excel Sheet with Vba? >> hi Kosser, >> >> There are (at least ) two answers to this: >> >> 1: If you just want to download the page, then you can use >> ms' "Microsoft.XMLHTTP" object to download the page to a >> string array. Then you can sift through the page (text) >> to get what you want. There are numerous examples of how >> to do this in the archives of this ng. >> >> 2: If you just want to pick up some specific data off the >> page (for example, to get a stock quote) then you could use >> msXL's built-in "web query" feature. This is probably discussed >> in your XL help file, and if not then you can read about it >> on msdn: >> >> http://office.microsoft.com/en-us/ex...548481033.aspx >> >> >> cheers, jw >> ____________________________________________________________ >> >> You got questions? WE GOT ANSWERS!!! ..(but, no guarantee >> the answers will be applicable to the questions) > > Thanks jw for responding. > Earlier I was downloading with web query , but website owner put "captha > test" in website and this problem is insolvable . > Your variant1 (Microsoft.XMLHTTP) is what I am interesting. > But i very noobie for VBA (my english too very bad) and need help. > I was meet diferent code where used manipulations with URL, but i dont > need this way. > > Need simple way: opened website load all info- copy all text to excel > sheet. (Not hyperlinks, not controlls, not pictures, not txt fail). > > > Private Sub CommandButton1_Click() > > 'Reference needed for Microsoft Internet Controls > > Dim SWs As SHDocVw.ShellWindows > > Dim i As Long, Adres As String > > Set SWs = New SHDocVw.ShellWindows > > > > For i = SWs.Count - 1 To 0 Step -1 > > Adres = CStr(SWs(i).LocationURL) > > If Adres Like "http*" Then > > > > ' Something like this: > > ' ActiveWebsite.Select.All > > ' ActiveWebsite.Copy > > ' Wbk("Data.xls").Activate > > ' Wbk("Data.xls").Sheet1.Open > > ' Selection.Paste > > > > End If > > Next i > > Range("A1").Select > > Set SWs = Nothing > > End Sub > > > Or some sample code using: Microsoft.XMLHTTP > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Search through Excel sheet and Fill in data. | PowerShell | |||
| Re: Color to Excel sheet? #FF0000 (255,0,0) | VB Script | |||
| Find the last Row in an Excel Spread Sheet | PowerShell | |||
| how to write recordset datas of vbscript into existing excel sheet | VB Script | |||
| create pdf file from each excel sheet. | PowerShell | |||