Ciao a tutti, ho creato questa macro per scaricare le tabelle dal sito
soccer24 tramite HTML, l'unico problema è che non riesco a prelevare i dati relativi alla sezione forma, quindi l'ultima colonna.
Sapete se c'è qualche modo per prelevarli??
Sub tabella()
Dim ie as Object
Dim aEle As Object
Dim y As Integer
If ie Is Nothing Then Set ie = CreateObject("InternetExplorer.application")
With ie
.Navigate "https://www.soccer24.com/italy/serie-a/standings/"
.Visible = True
Do While .Busy: DoEvents: Loop 'Attesa not busy
Do While .readyState <> 4: DoEvents: Loop 'Attesa documento
End With
Application.Wait Now + TimeValue("00:00:02")
y = 2
For Each aEle In ie.document.getelementbyid("table-type-1").getElementsByTagName("tr")
Debug.Print aEle.textContent
Sheets("foglio1").Range("A" & y).Value = aEle.Children(0).textContent
Sheets("foglio1").Range("B" & y).Value = aEle.Children(1).textContent
Sheets("foglio1").Range("C" & y).Value = aEle.Children(2).textContent
Sheets("foglio1").Range("D" & y).Value = aEle.Children(3).textContent
Sheets("foglio1").Range("E" & y).Value = aEle.Children(4).textContent
Sheets("foglio1").Range("F" & y).Value = aEle.Children(5).textContent
Sheets("foglio1").Range("G" & y).Value = aEle.Children(6).textContent
Sheets("foglio1").Range("H" & y).Value = aEle.Children(7).textContent
Sheets("foglio1").Range("I" & y).Value = aEle.Children(8).textContent
y = y + 1
Next
ie.Quit
End Sub