Is it possible to pull information from a specific location on a site in excel?

1

My question is the following ... I have a TopDesk called. I would like to pull information like opening and closing date and status (open, closed, resolved) ... I would like to know if in excel I have to do this procedure.

It's the same concept we use with selenium in python to do this. Example:

When placing the ID, it pulls the status, the opening date, etc ... Pull on html < li > something etc ...

    
asked by anonymous 29.11.2018 / 11:30

1 answer

0

Yes, using VBA in Excel. (If you do not know, comment that I explain much more detailed how to activate it and use the commands)

Create a Form, then a button.

Click Tools, then click References, and enable the following "Microsoft Html Object Library" and "Microsoft xml" options.

Now double-click the button and enter the following code:

'Iniciando variaveis
Dim http As New XMLHTTP60, html As New HTMLDocument
Dim source As Object

With http
     'Open(método, url, usuario(se necessario), senha(se necessario))
    .Open "GET", "http://www.brazil4export.com/en/pesquisa/resultado/?page=1&", False
    .send
    html.body.innerHTML = .responseText
End With
'Um loop para pegar informações de um elemento
For Each source In html.getElementsByClassName("panel-heading")
    x = x + 1: Cells(x, 1) = source.getAttribute("data-Name")
    Cells(x, 2) = source.getAttribute("data-site")
Next source

Now just study this code and mold it to your needs. Test it like this and see it working.

    
29.11.2018 / 13:10