Okay, this works, but you need to be careful with your dates. They are actually not dates, but strings. The out put data are in sheet1, but you can change it to suit you.
option Explicit
Sub Download()
Dim Start As String
Dim Ending As String
Dim IE As Object
Dim hTable As Object
Dim hBody As Object
Dim hTR As Object
Dim htD As Object
Dim tb As Object
Dim tr As Object
Dim td As Object, c&, r&, t&
Start = Day(Date + 11) & "." & Month(Date - 20) & "." & Year(Date)
Ending = Day(Date) & "." & Month(Date) & "." & Year(Date)
Set IE = CreateObject("InternetExplorer.Application")
With IE
'IE.Visible = 0
.navigate "https://www.conseq.cz/indexes/IndexCZGBFRN.aspx"
Do Until .readyState = 4
Loop
.document.all("txtDateFrom").Value = Start
.document.all("txtDateTo").Value = Ending
.document.all("txtDateTo").Select
End With
SendKeys "{ENTER}", True
SendKeys "{NUMLOCK}", True
Application.Wait (Now + TimeValue("00:00:01"))
Set hTable = IE.document.getElementsByTagName("table")
For t = 0 To (hTable.Length - 1)
For r = 0 To (hTable(t).Rows.Length - 1)
For c = 0 To (hTable(t).Rows(r).Cells.Length - 1)
Sheets("sheet1").Cells(r + 1, c + 1) = hTable(t).Rows(r).Cells(c).innerText
Next c
Next r
Next t
IE.Quit
End Sub
Bookmarks