Importing online data into an Excel spreadsheet

jayrdi

New Member
Joined
Jun 2, 2014
Messages
2
Hi all, 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', Web of Science [v.5.13.3] - All Databases Home which is a site that details academic publications and journals.

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.

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': Web of Science [v.5.13.3] - All Databases

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.

Is this possible? Perhaps by using VBA code within Excel?

What would people recommend? I am really only a novice Excel user but do have programming experience.

Thank you very much for your help,

John
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
FYI this is what I have so far, only been working on it for a few hours!

Code:
Sub WoS()

  [COLOR=#ff0000]  ' allow user to enter keyword for search
    ' myInput = InputBox("Please enter the subject for Publication Name: ")[/COLOR]
    
    Dim IE As Object
    Dim Doc As Object
    Set IE = CreateObject("internetexplorer.application")
    IE.Visible = True
        
navigate:
    
   [COLOR=#ff0000] ' navigate to the relevant website[/COLOR]
    IE.navigate "http://apps.webofknowledge.com/UA_GeneralSearch_input.do?product=UA&search_mode=GeneralSearch&SID=W1QoAFWjMXZh2esItCv&preferencesSaved="
    
[COLOR=#ff0000]    ' wait until page has finished loading
[/COLOR]    Do While IE.readystate <> 4: DoEvents: Loop
    
[COLOR=#ff0000]    ' create object html class
[/COLOR]    Set Doc = CreateObject("htmlfile")
    Set Doc = IE.document
    
    If Doc Is Nothing Then GoTo navigate
    
[COLOR=#ff0000]    ' value(input1) is id of field where user enters search words
[/COLOR]    Set myInput = Doc.getelementbyid("value(input1)")
    myInput.Value = InputBox("Please enter the subject for Publication Name: ")

[COLOR=#ff0000]    ' click 'submit' button after entered search parameter
[/COLOR]    Set btnSubmit = Doc.getelementbyid("UA_GeneralSearch_input_form_sb")
    btnSubmit.Click
    
End Sub

Have put comments in red so that they are obvious. Wasn't sure where to put the 'myInput' value (entered by user) which is why it's in there a few times and commented out. Where it is left is where it seemed to work.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,222,539
Messages
6,166,665
Members
452,062
Latest member
soyti

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