|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 蓝天630902 于 2012-6-13 21:53 编辑
Sub 查看专业资质排名()
On Error Resume Next
With CreateObject("internetexplorer.application")
.Visible = True
.Navigate "http://www.gzgcjg.com/gzqypjtx/Estimate/ZY/MainQueryMarkZY.aspx?clearPaging=true"
Do Until .ReadyState = 4
DoEvents
Loop
.Document.All("ctl00$cph_content$drpZzdj").Value = "jzzxzs"
.Document.All("ctl00$cph_content$drpZzdj").onchange
Do Until Trim(.Document.All.tags("table")(1).All.tags("tr")(1).All.tags("td")(1).innerText) <> "广东省基础工程公司"
DoEvents
Loop
Set r = .Document.All.tags("table")(1).Rows
n = Range("a65536").End(xlUp).Row
For i = 0 To r.Length - 1
For j = 0 To r(i).Cells.Length - 1
Cells(i + 1 + n, j + 1) = r(i).Cells(j).innerText
Next j
Next i
For k = 2 To 39
n = Range("a65536").End(xlUp).Row
.Document.All("ctl00$cph_content$GridViewPaging1$txtGridViewPagingForwardTo").Value = k
.Document.All("ctl00$cph_content$GridViewPaging1$btnForwardToPage").Click
Do Until .Document.All.tags("table")(1).All.tags("tr")(1).All.tags("td")(1).innerText <> Cells(n - 19, 2)
DoEvents
Loop
Set r = .Document.All.tags("table")(1).Rows
For i = 1 To r.Length - 1
For j = 0 To r(i).Cells.Length - 1
Cells(i + n, j + 1) = r(i).Cells(j).innerText
Next j
Next i
Next k
End With
End Sub
|
|