1

I am trying to automate a process of downloading file from a website. At the moment I am able to open a link that runs a javascript which produces an output file, here's my code:

Sub WebDataExtraction()

Dim URL As String
Dim IeApp As Object

URL = "http://si3.bcentral.cl/Siete/secure/cuadros/DescargarExcel.aspx?DropDownListFrequency=&DrDwnCalculo=NONE&codCuadro=UF_IVP_DIARIO"

Set IeApp = CreateObject("InternetExplorer.Application")

IeApp.Navigate URL

End Sub

When I run the sub the IE View Downloads window pops out. To download the file I am trying to follow this approach, however while I am using the attached code I am unable to find a child window.

Can somebody advise me how to proceed from here? Or maybe any suggestion how to approach this problem differently?

Daniel Dušek
  • 13,683
  • 5
  • 36
  • 51
Kamil G
  • 41
  • 4
  • 1
    I get "Session timeout" error when try to open the [link](http://si3.bcentral.cl/Siete/secure/cuadros//DescargarExcel.aspx?DropDownListFrequency=&DrDwnCalculo=NONE&codCuadro=UF_IVP_DIARIO) you provided. Take a look at [this](http://stackoverflow.com/q/32253563/2165759) and [this](http://stackoverflow.com/q/33462100/2165759). – omegastripes Nov 07 '16 at 16:38
  • Thanks for the examples, I will try to reproduce them. Just to clarify, the data I want to download is [here](http://si3.bcentral.cl/Siete/secure/cuadros/home.aspx) under the the Prices tab – Kamil G Nov 07 '16 at 17:59

0 Answers0