Clicking and Download file into a excel (javascript Excel)

luizandre1976

New Member
Joined
May 30, 2016
Messages
3
I everybody, I´m a begginer user, and I need to download one file from a websie below, I´ve checked a lot of foruns to do that without success. I think that this is a java script, but I didnt find a name of the tag to do this download and I cant find how can I click in some links in this website.


I need a macro in excel that click in "Séries Autorizadas" and then "Lista Completa de Séries Autorizadas" to start the download to a my file folder.

Could you help me please?


This is the website.
Opções
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Thank you for your atention!
But did'nt work and I dont know why. I used the same code below:
Code:
[COLOR=#333333]Sub Update()[/COLOR]'Add YOUR website
'to Internet Explorer
'trusted website

'Open IE-Internet Options-Security-Trusted Sites-Sites
'then YOUR site

Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
IE.Visible = True

'To open the website
.navigate "http://www.bmfbovespa.com.br/pt_br/servicos/market-data/consultas/mercado-a-vista/opcoes/"
Do While .Busy: DoEvents: Loop
Do While .readyState <> 4: DoEvents: Loop

'To download the file
IE.navigate "javascript:__doPostBack('ctl00$contentPlaceHolderConteudo$seriesAutorizadasEmp$lblListaArquivoSerieAut','')"
Do While .Busy: DoEvents: Loop
End With
 [COLOR=#333333]End Sub
[/COLOR]

What I made wrong?

thanks again
 
Upvote 0
I think that the problem is in "busy" code line instructions. I took off some "Busy and loop" lines and it works.
The problem now is with the instructions to save the file.
I´m still working with that.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,977
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top