0
I’m trying to extract a specific table from a website and paste it into a spreadsheet to update a database daily. But as it is impossible to download the table as excel or csv, I must extract the table directly from the site.
Follow my code and where I’m in trouble (where it says "HERE").
Sub Daily()
'Create Internet Explorer Browser
Dim appIE As Object
Set appIE = CreateObject("internetexplorer.application")
'Ask Browser to navigate to website (.Visible=False will hide IE when running)
With appIE
.Navigate "https://www.infomoney.com.br/mercados/ferramentas/contratos-di-futuro"
.Visible = True
End With
'Have the macro pause while IE is busy opening and navigating
Do While appIE.Busy
DoEvents
Loop
'Designate the table to be extracted and Copy the data from table - HERE
'Close IE and clear memory
appIE.Quit
Set appIE = Nothing
'Clear area and paste extracted text into the appropriate sheet/cells - HERE
Worksheets("Sheet1").Range("A2:H1000").ClearContents
Sheets("PPG").Select
Range("A2").Select
End Sub
The language of the site is Portugues. Translate your question.
– user28595
Cross Post
– danieltakeshi