I am studying Astrology.
I am trying to download some data from
After clicking the following
it will go to another page
Once the “Click Once” is pressed, the data will be shown as 1 whole page in
If you were to refer to the attachment,
I am trying to collect Data from 1st July 1997 to 31st December 2022.
Should you have doubt if I have any knowledge of VBA, please refer to the following working code.
Thanking in Advance.
Sub Get_Web_Data() Dim request As Object Dim response As String Dim html As New HTMLDocument Dim website As String Dim price As Variant Dim FstDate As Date Dim TheDate As String Dim r As Long 'String of initial date FstDate = CDate("1997-07-03") '<<<<< Edit first date string if required or have entered via an input box? For r = 0 To 9400 ' r+2 will fill rows 2 to 9400 TheDate = LCase(Format(FstDate + r, "yyyy%2Fmm%2Fdd")) website = "https://www.fourmilab.ch/cgi-bin/Solar?date=1&utc=" & TheDate & "+10%3A30%3A00&jd=2476948.34564&img=-k0&sys=-Sf&eyes=0&imgsize=320&orb=-b0&lat=1%B017&ns=North&lon=103%B051&ew=East&hlat=90%B0&hns=North&hlon=0%B0&elements=" Set request = CreateObject("MSXML2.XMLHTTP") request.Open "GET", website, False request.send response = StrConv(request.responseBody, vbUnicode) html.body.innerHTML = response price = html.getElementsByTagName("pre")(0).innerText Cells(r + 2, "B") = price Next r End Sub