+ Reply to Thread
Results 1 to 5 of 5

Web Scrape To Excel VBA: JAVA Site

  1. #1
    Forum Contributor
    Join Date
    08-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    146

    Web Scrape To Excel VBA: JAVA Site

    Hello Fellow Forumers!

    I have bitten off a bit of a challenging(in my opinion) project where I'd like to query a website(list of addresses in excel pre-populated by myself) and "copy paste" back into excel. I started to follow a youtube tutorial online but realized that its tough to modify the url I believe if its made in Java. I dont have much experience but am usually good following tutorials and modifying to my case. What I'd like to do:
    Steps:
    1) Navigate https://wwwnet1.state.nj.us/Treasury...istSearch.aspx
    2) Enter Address from cells in the L column and enter into "Property Location" on the website
    3) When result(s) are displayed then click/navigate to "View"
    4) On view I'd like to match the data from the inquiry ONLY to the Bolded columns and repeat this all the way down the L column
    *If more than one result is displayed on step 3 I'd like to choose the first one.

    If anyone thinks they can take over my VBA I started or start fresh I'd so so so appreciate it! This is my first web scrape project and I'd love to be able to learn from this to apply to other cases(expecially if it IS JAVA and its more difficult than most)

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    146

    Re: Web Scrape To Excel VBA: JAVA Site

    Does anyone have experience with this?

  3. #3
    Forum Contributor
    Join Date
    08-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    146

    Re: Web Scrape To Excel VBA: JAVA Site

    Maybe someone has good success with hiring someone to make a web scrape VBA code?

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Web Scrape To Excel VBA: JAVA Site


    Hi !

    See Web Scraping archives and many samples in this forum as well …

  5. #5
    Registered User
    Join Date
    07-18-2016
    Location
    Michigan
    MS-Off Ver
    2013
    Posts
    1

    Re: Web Scrape To Excel VBA: JAVA Site

    Trying to write a code for web scraping the weather off the website there is forecast data in a table I am not able to get. Run-time error '438 keeps coming up. Any recommendations on how I can fix this issue?

    tSpan = Doc.getElementById("Forecast").getElementById("fctday-20160719")
    '.getElementsByClassName("hi").innerText


    Code

    Sub Weather_Scrape()
    Dim counter As Integer
    Dim Doc As HTMLDocument
    counter = 0
    Dim zipcodes As Range
    Set zipcodes = Range("D5:D30")
    'For each: in zipcodes then do a webscrape
    Dim IE As New InternetExplorer
    IE.Visible = True
    Dim sSpan As String
    Dim tSpan As String
    Dim dd As HTMLDocument

    ' For Each i In zipcodes
    ' If i <> "" Then
    ' IE.navigate "https://www.wunderground.com/cgi-bin/findweather/getForecast?query=" & i.Value
    ' Do
    ' DoEvents
    ' Loop Until IE.readyState = READYSTATE_COMPLETE
    ' Set Doc = IE.document
    ' sSpan = Doc.getElementById("curTemp").innerText
    ' Range("E5").Offset(counter, 0) = sSpan
    ' counter = counter + 1
    ' End If

    ' Next i
    ' counter = 0
    For Each i In zipcodes
    If i <> "" Then
    IE.navigate "https://www.wunderground.com/cgi-bin/findweather/getForecast?query=" & i.Value
    Do
    DoEvents
    Loop Until IE.readyState = READYSTATE_COMPLETE
    Set Doc = IE.document

    Range("F5").Offset(counter, 0) = tSpan
    counter = counter + 1
    End If
    Next i

    IE.Quit

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need VBA code to scrape data into excel from list of websites
    By nadair1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2014, 11:45 AM
  2. Scrape Data Using VBA From IE to Excel - Help with code
    By Galleon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2014, 11:00 AM
  3. Scrape, pull or get data from a Website into Excel Please help me out
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2014, 01:42 PM
  4. Having trouble with Excel web query for data scrape
    By stevenab87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2012, 10:18 PM
  5. get data from a asp .net web site (java script)
    By harish.gajawada in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2012, 03:28 AM
  6. Excel and JAVA
    By jrdnoland in forum The Water Cooler
    Replies: 1
    Last Post: 12-05-2009, 10:03 PM
  7. Excel and Java?
    By natepen in forum Excel General
    Replies: 3
    Last Post: 02-13-2007, 03:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1