excel - How to getElementsByClassName from IE to XL -
i errors using getelementsbyclassname in code, , hints doing wrong. using getelementbyid, classname gives errors me.
set objexplorer = createobject("internetexplorer.application") website = "http://charting.nasdaq.com/ext/charts.dll?2-1-14-0-0-512-03na000000abt-&sf:1|8|27-sh:8=200| 27=10-bg=ffffff-bt=0-wd=635-ht=395--xtbl-" wscript.sleep 1000 objexplorer .navigate2 website .left=5 .top=5 .height=1000 .width=700 .addressbar = 0 .visible = 1 .toolbar = 0 .statusbar = 0 wscript.sleep 3000 end set xl = createobject("excel.application") xl.visible = true set wb = xl.workbooks.open("c:\users\user\documents\ci\testauto.xlsx") set ws = wb.sheets("sheet1") wscript.sleep 2000 ws.range("g9").value = objexplorer.document.getelementsbyclassname("drilldowndata").innertext wscript.sleep 1000 objexplorer.quit
Comments
Post a Comment