|

楼主 |
发表于 2019-2-3 15:48
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
祝老师们新年快乐!
下面是API的应用
Sub apijwd()
URL = "http://api.map.baidu.com/geocoder?address="
With CreateObject("MSXML2.XMLHTTP")
mr = [a65536].End(3).Row
For m = 2 To [a65536].End(3).Row
Cells(m, 6) = "": Cells(m, 7) = ""
.Open "GET", URL & yy = GetU(Cells(m, 1)), False
.send
V = .responseText
Cells(m, 7) = Split(Split(V, "at>")(1), "<")(0)
Cells(m, 6) = Split(Split(V, "g>")(1), "<")(0)
Next
End With
End Sub
|
评分
-
1
查看全部评分
-
|