Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello if you know the index of the link , you may try Sub declencherLienPageWeb() 'Microsoft HTML Objects Library 'Microsoft Internet Controls Dim IE As New InternetExplorer Dim Cible As HTMLAnchorElement Dim Doc As HTMLDocument IE.Navigate "http://www.webPage.html" IE.Visible = True Do Until IE.readyState = READYSTATE_COMPLETE DoEvents Loop Set Doc = IE.Document Set Cible = Doc.Links(20) Cible.Click End Sub to import the table , you could adapt this exemple Sub Importer_tableauPageWeb() Dim IE As InternetExplorer Dim maPageHtml As HTMLDocument Dim Htable As IHTMLElementCollection Dim maTable As IHTMLTable Dim j As Integer, i As Integer Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True IE.navigate "http://www.webPage.html" Do Until IE.readyState = READYSTATE_COMPLETE DoEvents Loop Set maPageHtml = IE.document Set Htable = maPageHtml.getElementsByTagName("table") 'objet type table Set maTable = Htable(0) ' the first table For i = 1 To maTable.Rows.Length ' table rows For j = 1 To maTable.Rows(i - 1).Cells.Length ' each cell of the row Cells(i, j) = maTable.Rows(i - 1).Cells(j - 1).innerText Next j Next i End Sub Regards michel -- michelxld ------------------------------------------------------------------------ michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367 View this thread: http://www.excelforum.com/showthread...hreadid=497325 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CreateObject("Excel.Application") | Excel Worksheet Functions | |||
Permission denied in CreateObject(Excel.Application") | Excel Programming | |||
Set OutApp = CreateObject("Outlook.Application") - Runtime error 429 | Excel Programming | |||
ASP: CreateObject("Excel.Application") IIS 6.0 Win2003 | Excel Programming | |||
CreateObject("Excel.Application") - Access denied | Excel Programming |