Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I read the article "Code to get data from webpage into Excel" while
I was searching to solve my problem. Actually is quite similar to "donbowyer" 's problem. The code is : Sub TheSub() 'Microsoft Internet Controls 'Microsoft HTML Object Library Dim myIE As InternetExplorer Dim myDoc As MSHTML.HTMLDocument Dim myImg As MSHTML.HTMLImg Dim mySiteUrl As String Dim E As MSHTML.HTMLGenericElement MyDay = Format(Now, "YYYYMMDD") mySiteUrl = "http://tv.pathfinder.gr/" 'URLhp Set myIE = New InternetExplorer With myIE ' .Visible = True .Navigate mySiteUrl Do Until .readyState = READYSTATE_COMPLETE: Loop .Document.all.searchDt.Value = mDay .Document.all.searchChannel.Value = "mega" .Document.all.searchType.Value "0" .Document.all.doSearch.Click Do Until .readyState = READYSTATE_COMPLETE: Loop Set myDoc = .Document With myDoc ActiveSheet.Cells(1, "A").Value = .body.innerText End With End With myIE.Quit Set myIE = Nothing Set myDoc = Nothing End Sub The purpose is to go to the startpage : http://tv.pathfinder.gr/" , put 3 criteria programmatically (mDay, "mega", "0"), do the Search (doSearch.Click) and after the page has loaded with the results to get the results (the table with the TV program) in the active sheet. The problem is that I get data from the first page not from the page with the results (second page). Any suggestions would be most welcome. Charalampos |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing webpage data into Excel | Excel Discussion (Misc queries) | |||
Code to get data from webpage into Excel | Excel Programming | |||
In Excel 2000 can you write VBA code to pull data from a webpage? | Excel Programming | |||
In Excel 2000 can you write VBA code to pull data from a webpage? | Excel Programming | |||
Open Webpage and then Run Code | Excel Programming |