title: Download data from webpage using vba Excel
body: <p>in this post I try to reformulate my previous questions.
  I am trying to extract in excel a table in a webpage. The problem  is that the webpage is generated using javascript so when I look at the page source I do not find where  the table is defined. What I was trying to do is:</p>
  
  <ol>
  <li>Load the page </li>
  <li>Select from a first menu on the left the option "Calcio" and then "ITA Serie A" (sorry but the webpage is in Italian)</li>
  <li>Extract the data in the table using "standard" functions such as getElementsByTagName or getElementByID</li>
  </ol>
  
  <p>Up to now I was able to load the page, run a script for step 2 (and the page is correctly updated). The problem is that when I look at the page source I am not able to find the table I am interested in (the one with the Header "ESITO FINALE 1X2") so I do not know how to proceed to import the table in Excel.</p>
  
  <p>The starting page url is : "<a href="https://www.sisal.it/scommesse-matchpoint" rel="nofollow">https://www.sisal.it/scommesse-matchpoint</a>".</p>
  
  <p>My goal is to import the data of the table into excel so if there is a completely different approach to solve the problem I am open to it. Thanks!</p>
  
  <pre><code>Sub Control_Sisal()
  
    Dim htmlPage          As htmlDocument
    Dim strUrl            As String
    Const Title As String = "scommesse"
  
    strUrl = "https://www.sisal.it/scommesse-matchpoint"
  
    Call Navigate_Sisal(strUrl, htmlPage, Title)
  
  End Sub
  
  Sub Navigate_Sisal(strUrl As String, htmlPage As htmlDocument, Title As String)
  
    Dim IE            As Object
    Dim strScript     As String
  
    Set IE = CreateObject("InternetExplorer.application")  '
    IE.Visible = True
    IE.navigate strUrl
  
    Do 
       DoEvents 
    Loop Until IE.ReadyState = READYSTATE_COMPLETE 
    '
    ' Run the scripts to get the data
    '
    strScript = "getAlberaturaAntepostManager().clickManifestazione(1, 21)"
    IE.Document.parentWindow.execScript strScript, "jscript"
  
    Do 
      DoEvents 
    Loop Until IE.ReadyState = READYSTATE_COMPLETE
  
    Set htmlPage = IE.Document
  
  End Sub
  </code></pre>