View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dungan dan dungan is offline
external usenet poster
 
Posts: 411
Default retrieve data from an .aspx web page

Hi,

I'm using Excel 2000 on Windows XP.

I'm attempting to retrieve data from
http://www.backshellworld.com/crossreference.aspx.

I copied the code below, and I'm trying to modify it to select the
dropdown lists, but

I'm missing something.

Are there any suggestions?

Thanks,

Dan

Case "ElectroAdapter"
If itm.tagname = "Script" Then
State = "GetData"
End If
Case "GetData"
If itm.tagname = "H2" Then
'get next section of data
State = "FindB2"
End If

Select Case itm.tagname

Case "DIV"
colCount = 4 'start each row in column D
RowCount = RowCount + 1
Case "SPAN"
Cells(RowCount, colCount) = itm.innertext
colCount = colCount + 1
End Select
End Select
Next itm
IE.Quit
End Sub

Sub Dump(document)

With Sheets("dump")
.Cells.ClearContents
RowCount = 1
For Each itm In document.all
.Range("A" & RowCount) = itm.tagname
.Range("B" & RowCount) = itm.className
.Range("C" & RowCount) = itm.ID
.Range("D" & RowCount) = Left(itm.innertext, 1024)

RowCount = RowCount + 1
Next itm
End With
End Sub