View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Should TD be HTMLTableCell?

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


"George J" wrote in message
...
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