Should TD be HTMLTableCell?

G

George J

I am trying to pull data from a webpage, but the number of tables changes
from time to time.
I have found that the table is nested in a cell (< T D > tag) and this cell
has a classname so i can work my way through all the TD's in the document
until i get to the appropriate one...

Then how do i get to the table within that TD?

If i have

Dim TDCell as HTMLTableCell
'and find the appropriate cell using
If TDCell.className = "leftmenu_cel" Then

I can't use for each oTable in TDCell otherwise an error comes up so should
TDCell be something other than HTMLTableCell or can someone advise me on how
to extract the table data from here? I've checked that the table doesn't have
any unique classname - that would be too easy

thanks
George
 
T

Tim Williams

If the table is nested in a td then you should be able to get at it using

TDCell.getElementsByTagName("TABLE")

or something like that. This will return a collection of any tables
contained in the td. If there's only one then it will be

TDCell.getElementsByTagName("TABLE")(0)

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top