Skip to content Skip to sidebar Skip to footer

Loop Through TD Element In HTML Document From Inside Frame VBA Excel IE8 Automation

I am trying to capture Table data inside a particular webpage Frame using Excel VBA. Unfortunately the website is non-public, so I cannot give access. Here is a snippet from the E

Solution 1:

How many tables are there in that frame?

Try something like:

Set HTMLDoc = ie.document.frames(12).document
Set tbls = HTMLDoc.getElementsByTagName("table")

For x = 0 to tbls.length - 1  
    Set tbl = tbls(x)
    debug.print "Table# " & (x+1), "rows=" & tbl.Rows.length
Next x

Post a Comment for "Loop Through TD Element In HTML Document From Inside Frame VBA Excel IE8 Automation"