Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello
I am using the getelementsbytagname="OL" method(?) to capture items in an ordered list. Each list item is an anchor and a label (link to another web site). I want to capture the label but not the anchor. I am not sure how to use innertext to capture one part versus the other. when capturing table data I can do this with .Rows(j).Cells (0).innertext not sure what to do with a LI tia |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There may be a property href that has the daa you are looking for. I often
set break point and watch items to troubleshgoot these type problems set itm = getelementsbytagname="OL" a = 1 'set break point on this line and then add a watch to the variable itm. You can set the watch by right clicking on "ITM" and then select Add Watch. another method that sometimes helps is dumping the webpage into the workbook like this RowCount = 1 for each itm in IE.document.all Range("A" & Rowcount) = itm.tagname Range("B" & Rowcount) = itm.classname Range("C" & Rowcount) = itm.id Range("D" & Rowcount) = left(itm.innertext,1024) RowCount = rowCount + 1 next itm " wrote: hello I am using the getelementsbytagname="OL" method(?) to capture items in an ordered list. Each list item is an anchor and a label (link to another web site). I want to capture the label but not the anchor. I am not sure how to use innertext to capture one part versus the other. when capturing table data I can do this with .Rows(j).Cells (0).innertext not sure what to do with a LI tia |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It would help if you could post the HTML (a small example) for the OL
element. Tim wrote in message ... hello I am using the getelementsbytagname="OL" method(?) to capture items in an ordered list. Each list item is an anchor and a label (link to another web site). I want to capture the label but not the anchor. I am not sure how to use innertext to capture one part versus the other. when capturing table data I can do this with .Rows(j).Cells (0).innertext not sure what to do with a LI tia |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create an ordered list from 2d array | Excel Worksheet Functions | |||
Compare List A to List B, Return List B Items Not in List A | Excel Programming | |||
How can I input an ordered or bulleted list in a XL cell | Excel Discussion (Misc queries) | |||
extract data from a random list & place in another ordered list | Excel Discussion (Misc queries) | |||
generating rank-ordered list | Excel Discussion (Misc queries) |