excel - VBA Webscrape not picking up elmenents; pick up frames/tables? -


tried asking question. didn't many answers. can't install things onto work computer. https://stackoverflow.com/questions/29805065/vba-webscrape-not-picking-up-elements

want scrape morningstar page excel code below. problem is, doesn't feed real elements/data back. want dividend , cap gain distribution table link put my_page.

this easiest way, entire page scrape way, , excel-->data-->from web don't work.

i've tried use elements tag name , class before, failed @ being able in case.this might way go... once again, want dividend , cap gain distribution table. not seeing results in via debug.print

working code below, need parse excel. updated attempt below:

sub macro1()       dim ie new internetexplorer     ie.visible = true     ie.navigate "http://quotes.morningstar.com/fund/fundquote/f?&t=annpx&culture=en_us&platform=ret&viewid1=2046632524&viewid2=3141452350&viewid3=3475652630"         doevents     loop until ie.readystate = readystate_complete     dim doc htmldocument     set doc = ie.document        'for each table in doc.getelementsbyclassname("gr_table_b1")      'for each td in table.getelementsbytagname("tr")     on error resume next     each td in doc.getelementsbyclassname("gr_table_row4")     debug.print td.cells(5).innertext     'debug.print td.cells(1).innertext     next td     'next table       'ie.quit          'application.enableevents = true      end sub 

the content in question contained within iframe. can see right clicking on section of sebsite, , selecting inspect element. looking tree, you'll see iframe tag, containing url of data. should try find element, , extract url (which generated ) , open page.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -