title: Importing online data into an Excel spreadsheet
body: <p>I have been tasked with streamlining a process to collect data from a specific online website and import it into an Excel 2010 spreadsheet. Website is 'Web of Science', <a href="http://apps.webofknowledge.com/UA_GeneralSearch_input.do?product=UA&amp;SID=T2b1MtfKgCqeB2h9j9J&amp;search_mode=GeneralSearch" rel="nofollow">http://apps.webofknowledge.com/UA_GeneralSearch_input.do?product=UA&amp;SID=T2b1MtfKgCqeB2h9j9J&amp;search_mode=GeneralSearch</a> which is a site that details academic publications and journals.</p>
  
  <p>Currently they are going to the website, entering a short number of search parameters and then manually recording the pertinent data from the webpage. They would like to be able to enter a keyword in Excel (which acts as the search item) which then automatically does the rest of the process and provides them with a spreadsheet of the required data.</p>
  
  <p>The data they require however comes in the form of a list of potential authors for the entered publication name which currently comes up on the website as a selection of check-boxes under 'Refine Results': <a href="http://apps.webofknowledge.com/RAMore.do?product=UA&amp;search_mode=GeneralSearch&amp;SID=T2b1MtfKgCqeB2h9j9J&amp;qid=5&amp;ra_mode=more&amp;ra_name=Author&amp;colName=&amp;viewType=raMore" rel="nofollow">http://apps.webofknowledge.com/RAMore.do?product=UA&amp;search_mode=GeneralSearch&amp;SID=T2b1MtfKgCqeB2h9j9J&amp;qid=5&amp;ra_mode=more&amp;ra_name=Author&amp;colName=&amp;viewType=raMore</a></p>
  
  <p>So basically I need the user to be able to enter the search item in Excel that they would enter into the search field on the website, and then import a list of authors relevant to that subject into a spreadsheet.</p>
  
  <p>Is this possible? Perhaps by using VBA code within Excel?</p>
  
  <p>What would people recommend? I am really only a novice Excel user but do have programming experience.</p>
  
  <p>Thank you very much for your help,</p>
  
  <p>John</p>
  
  <p>*FYI, update, this is what I have so far which gets as far as a user entering a word which is then searched for by the website search facility.  Now need to get the authors and import them into the spreadsheet:</p>
  
  <pre><code>Sub WoS()
  
      Dim IE As Object
      Dim Doc As Object
      Set IE = CreateObject("internetexplorer.application")
      IE.Visible = True
  
  navigate:
  
      ' navigate to the relevant website
      IE.navigate "http://apps.webofknowledge.com/UA_GeneralSearch_input.do?   product=UA&amp;search_mode=GeneralSearch&amp;SID=T23ZytENYQRHyJkmixB&amp;preferencesSaved="
  
      ' wait until page has finished loading
      Do While IE.readystate &lt;&gt; 4: DoEvents: Loop
  
      Set Doc = CreateObject("htmlfile")
      Set Doc = IE.document
  
      If Doc Is Nothing Then GoTo navigate
  
      ' allow user to input keywords for search
      Set myInput = Doc.getelementbyid("value(input1)")
      myInput.Value = InputBox("Please enter the subject for Publication Name: ")
  
      ' click button to process search
      Set btnSubmit = Doc.getelementbyid("UA_GeneralSearch_input_form_sb")
      btnSubmit.Click
  
  End Sub
  </code></pre>