Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Should TD be HTMLTableCell?

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"