Dieser Code importiert Table aus dem Weblink.
Sub Import_SVGTabledata() Dim url As String, links_count As Integer Dim i As Integer, j As Integer, row As Integer Dim XMLHTTP As Object, html As Object Dim tr_coll As Object, tr As Object Dim td_coll As Object, td As Object links_count = 1 For i = 0 To links_count url = "Type Your Link Here" & i & ".html" Set XMLHTTP = CreateObject("MSXML2.XMLHTTP") XMLHTTP.Open "GET", url, False XMLHTTP.send Set html = CreateObject("htmlfile") html.body.innerHTML = XMLHTTP.ResponseText Set tbl = html.getelementsbytagname("Table") Set tr_coll = tbl(0).getelementsbytagname("TR") For Each tr In tr_coll j = 1 Set td_col = tr.getelementsbytagname("TD") For Each td In td_col Cells(row + 1, j).Value = td.innerText j = j + 1 Next row = row + 1 Next Next MsgBox "Done" End Sub
Hinweis: Sie können den LINK COUNT durch Ihren Wert ersetzen und für die URL den Link eingeben, den Sie verwenden möchten.
Ich hoffe, das hilft Ihnen, da es sich um einen getesteten Code handelt.