|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 蓝天630902 于 2012-5-18 05:08 编辑
Sub 企业个体工商户基本登记信息查询()
[a1:l1] = Split("企业/个体工商户名称,名称,地址,注册号,法定代表人,企业类型,经营期限,注册资本,登记机关,登记状态,成立日期,经营范围", ",")
Columns("D:D").NumberFormatLocal = "@"
On Error Resume Next
For p = 2 To Range("a65536").End(xlUp).Row '循环随便多少次
With CreateObject("internetexplorer.application")
.Visible = True
.Navigate "http://wsnj.gdgs.gov.cn/aiccps/SearchServlet?service=getEntityInfoByPage&corpName=" & Cells(p, 1)
Do Until .ReadyState = 4
DoEvents
Loop
Set r = .Document.All.tags("table")(1).Rows
For i = 0 To r.Length - 1
For j = 1 To r(i).Cells.Length - 1 Step 2
n = Range("IV" & p).End(xlToLeft).Column + 1
Cells(p, n) = r(i).Cells(j).innerText
Next j
Next i
.Quit
End With
Next p
End Sub
|
|