(Solved) – Getting data from Web page to excel

(solved)-–-getting-data-from-web-page-to-excel

I was trying to fetch data from an web page (resourceguru) , that is main of our planing of engineers arround the world to excel.
While I’m new to the “getting data from web” I tried some stuff i found on google like :`
Dim request As Object
Dim response As String
Dim html As New HTMLDocument
Dim website As String
Dim price As Variant

'Define URL
website = "https://app.resourceguruapp.com/somestuff/companyname/resources"

Set request = CreateObject("MSXML2.XMLHTTP")

request.Open "GET", website, False

request.setRequestHeader "IF-Modified-since", "Sat, 1 Jan 2000 00:00:00 GMT"

request.send

response = StrConv(request.responseBody, vbUnicode)
MsgBox (response)
html.body.innerHTML = response

price = html.getElementsByClassName("_2tZlDeCUZ8Ga_4930sUxi7")(0).innerText

MsgBox (price)

`

for easy webpages, which containing fuel prices, the code workes pretty well. On the webpage i want the data from it returns me nothing to the variable “price”. The Response is somehow cryptic, I wanted to share picture but I cant while I’m new to the forum.

My question is:
Am I have a problem with the login to that page ?
Am I having trouble with the response in a wrong format?
Am I having a problem with the programming languages?

thanks for the reply!

Leave a Reply

Your email address will not be published. Required fields are marked *