+ Reply to Thread
Results 1 to 4 of 4

VBA scraping specific value from website HTML

  1. #1
    Registered User
    Join Date
    02-11-2017
    Location
    PT
    MS-Off Ver
    2015
    Posts
    6

    VBA scraping specific value from website HTML

    Hi,

    Is it possible to scrape this particular value:

    sreenshot.PNG

    from this particular website:

    https://lt.morningstar.com/okhysb8ao...?id=F0GBR04AFQ

    I'm having trouble in identifying the object in order to apply the "getElementby ???" function:

    Please Login or Register  to view this content.
    Could you be so kind as to show me how can I fix my code to do so?


    Thanks so much!
    Last edited by Strutland; 03-25-2017 at 10:09 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA scraping specific value from website HTML

    cel.Offset(1).Value = doc.getElementsByTagName("table")(0).Rows(1).Cells(1).innerText
    I am assuming you are using IE and assigned the IE document to doc

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA scraping specific value from website HTML

    Or

    cel.Offset(1).Value = doc.getElementsByTagName("td")(8).innerText

  4. #4
    Registered User
    Join Date
    02-11-2017
    Location
    PT
    MS-Off Ver
    2015
    Posts
    6

    Re: VBA scraping specific value from website HTML

    Quote Originally Posted by AB33 View Post
    Or

    cel.Offset(1).Value = doc.getElementsByTagName("td")(8).innerText
    Thanks AB33, that was exactly what I was looking for.
    Thank you so much!

+ 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. Web Scraping - Fangraphs website
    By Josephrandall in forum Excel General
    Replies: 4
    Last Post: 04-23-2016, 08:51 AM
  2. [SOLVED] Scraping data from website
    By novicevba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2016, 11:02 AM
  3. Replies: 2
    Last Post: 01-07-2016, 12:25 PM
  4. Data Scraping from the WebSite
    By sathis in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-26-2015, 10:46 AM
  5. Scraping website into excel
    By eodsolo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-12-2014, 06:25 AM
  6. scraping data from a website
    By redpanda in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-05-2012, 01:20 PM
  7. HTML scraping using VBA
    By MacroLide in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-26-2012, 11:12 AM

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