6
I’m trying to access the values that appear on the site: http://www2.bmf.com.br/pages/portal/bmfbovespa/boletim1/BoletimOnline1.asp?caminho=&pagetype=pop&Acao=BUSCA&cboMercadoria=DI1
I could not access the values by direct hyperlink in excel, nor creating a querytable via VBA. Of the two modes the values do not return. Searching the internet, I saw that the values that are inputados via Javascript can not be removed this way, even because the values do not have an ID. Well, looking at the source code I can see how the values are inputados by a Script, but I have no idea how to bring these values from the site to Excel via VBA.
Could someone help me?
Follow the excerpt of the source code where the values are entered, are in bold. When you go to the site the values will be different from the ones below because the values are stock quotes.
<SCRIPT LANGUAGE='JScript'>
tab_A = tab_A + 'TR'
"tab_C = tab_C + '<TD ALIGN="right" CLASS="tabelaConteudo1">13,650</TD>';
tab_C = tab_C + '<TD ALIGN="right" CLASS="tabelaConteudo1">13,640</TD>';
tab_C = tab_C + '<TD ALIGN="right" CLASS="tabelaConteudo1">13,650</TD>';
tab_C = tab_C + '<TD ALIGN="right" CLASS="tabelaConteudo1">13,643</TD>';
tab_C = tab_C + '<TD ALIGN="right" CLASS="tabelaConteudo1">13,641</TD>';
tab_C = tab_C + '<TD ALIGN="right" CLASS="tabelaConteudo1">13,641</TD>';
tab_C = tab_C + '<TD ALIGN="right" CLASS="tabelaConteudo1">13,649</TD>';"
...
</SCRIPT>
Read it here later - http://meta.pt.stackoverflow.com/questions/297/quando-se-deve-coloca-o-nome-da-linguagem-no-t%C3%Adtulo
– PauloHDSousa
Look for a webservice and see how to use it. Programming tools can call the service and sometimes by the browser you can call it yourself, you will receive a different format of html but that can easily be placed in excel.
– Marlon Albuquerque
Maybe this question in Sopt help you find an alternative.
– Pagotti