Pull data from .aspx page for a excel column

Excel Help for Pull data from .aspx page for a excel column in Automating Data Analysis Tasks

Find Excel Solutions


Search the Forums:
Recent Activity:
Delete Cell Items In Spreadsheet
Importing Data From Pdf Files
New Portfolio Optimization Template Version
Financial Market Data Feed
Run Time Error 1004
Data Downloader Crashes Excel




Follow Business Spreadsheets On:
 
Forum TopicLogin
Pull data from .aspx page for a excel column
Rate this:
(3/5 from 1 vote)
ConfusedHello friends,

VBA Code:
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)

End Sub

Sub Pull_Status()
Dim iLastRow As Integer
Dim Rng As Range
Dim Txt As String

Me.WebBrowser1.navigate "http://124.124.193.235/eregister/viewdetails.aspx"

While Me.WebBrowser1.Busy Or Me.WebBrowser1.ReadyState <> 4
DoEvents
Wend

iLastRow = Cells(Rows.Count, "a").End(xlUp).Row
For Each Rng In Range("a2:a" & iLastRow)
If Not Rng.Value = vbNullString Then
Rng.Select
Me.WebBrowser1.Document.getElementById("applNumber").Value = Rng.Value
Me.WebBrowser1.Document.getElementById("btnView").Click
x = vbNullString
Do
On Error Resume Next
x = Me.WebBrowser1.Document.getElementsByTagName("td")(0).innerHTML
On Error GoTo 0
DoEvents
Loop While x <> "(NOT FOR LEGAL USE)"
For i = 0 To Me.WebBrowser1.Document.getElementsByTagName("td").length
If Me.WebBrowser1.Document.getElementsByTagName("td")(i).innerHTML Like "*Status*" Then
Txt = Me.WebBrowser1.Document.getElementsByTagName("td")(i).innerHTML
Exit For
End If
Next
Txt = StripHTML(Txt)
Txt = Replace(Txt, " ", vbNullString)
Txt = Replace(Txt, "Status :", vbNullString)

ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Txt
Me.WebBrowser1.navigate "http://124.124.193.235/eregister/viewdetails.aspx"
While Me.WebBrowser1.Busy Or Me.WebBrowser1.ReadyState <> 4
DoEvents
Wend

End If
Next Rng

End Sub

Thanks a lot
Kynthia Melissa
 Posted by on
[View the Full Thread for the "How to pull data from webpage(.aspx) for a excel column?" Topic]

Find relevant Excel templates and add-ins for Pull data from .aspx page for a excel column in the

 
Find Excel templates
and add-ins in the
Excel Business Solutions Directory

       
  © 2013 Business Spreadsheets. All Rights Reserved. Legal | About Us