gamendorf
10-04-2011, 09:13 PM
I am having trouble figuring out how to copy a table from a web page into excel. I have looked everywhere online that I can think of,but to no avail.
Here is the what the table looks like in the source code:
<div class=”AccClass” id =
“AccId”><span id=”AccSpan”><table cellspacing=”4”>***tr and td code***<\table></span></div>
This is the only occurrences of class “AccClass” andids “AccId” and “AccSpan”.
Also, this isthe only table on the page, and all of the table code exists on a single lineof HTML. (I know that that is probably a horrible way of coding a table, but I’mjust the user…)
Here is a brief summary of my VBA code so far:
Sub
HTMLtable_to_Excel()
Dim ObjIe as Object
Dim HTMLDoc as HTMLDocument
Set ObjIe = CreateObject("InternetExplorer.Application")
ObjIe.Navigate(MyURL)
Set HTMLDoc = ObjIe.document
***WhateverVBA Code is needed to complete the task (currently empty because I have no idea how to do it! ***
End Sub
I will gladly provide any more information if this is not specific enough. Thanks in advance for any advice!
Here is the what the table looks like in the source code:
<div class=”AccClass” id =
“AccId”><span id=”AccSpan”><table cellspacing=”4”>***tr and td code***<\table></span></div>
This is the only occurrences of class “AccClass” andids “AccId” and “AccSpan”.
Also, this isthe only table on the page, and all of the table code exists on a single lineof HTML. (I know that that is probably a horrible way of coding a table, but I’mjust the user…)
Here is a brief summary of my VBA code so far:
Sub
HTMLtable_to_Excel()
Dim ObjIe as Object
Dim HTMLDoc as HTMLDocument
Set ObjIe = CreateObject("InternetExplorer.Application")
ObjIe.Navigate(MyURL)
Set HTMLDoc = ObjIe.document
***WhateverVBA Code is needed to complete the task (currently empty because I have no idea how to do it! ***
End Sub
I will gladly provide any more information if this is not specific enough. Thanks in advance for any advice!