Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
#49679
Olá amigo, eu recomendaria trabalhar com Selenium Basic no Chrome é bem tranquilo para navegar e trazer informações.
Você faz o Download do Selenium Basic 2.0.9 depois do Chromedriver e seleciona lá nas referencias e mandar rodar a programação.
Exemplo:
Sub Anbima()



Dim driver As New Selenium.ChromeDriver
Set driver = New ChromeDriver
Dim destino As Range
Set destino = Sheets("Planilha1").Range("A1")
'driver.AddArgument ("--headless") 'depois de sua informação estiver sendo importado direitinho você vai utilizar esse para fazer em segundo plano, sem abrir o navegador.
driver.Get "https://www.anbima.com.br/pt_br/educar/ ... sional.htm"
While Busy
Application.Wait TimeSerial(Hour(Now), Minute(Now), Second(Now) + 15)
DoEvents:
Wend

driver.FindElementById("simplequery").SendKeys "sua pergunta" ' aqui você coloca o que queira pesquisar


Dim tabela As WebElement

Set tabela = driver.FindElementByXPath("") 'aqui você tem que inspecionar o elemento e pegar o xpathfull da tabela ou muda so para trazer um valor e assim por diante.

If tabela Is Nothing Then
MsgBox "Elemento não encontrado"
Else
tabela.AsTable.ToExcel destino
End If

driver.Quit

End Sub

Dependendo o Site tem que ir tentando e ajustando.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord