|
楼主 |
发表于 2020-3-6 13:10
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub 数据1()
Dim url, js
url = "http://zhishu.35.zqsos.com:896/multiIndex.aspx"
Set js = CreateObject("scriptcontrol")
js.Language = "jscript"
With CreateObject("msxml2.xmlhttp")
.Open "get", url, False
.send
js.addcode ("qd=" & .responsetext)
slen = js.eval("qd.data.length")
sslen = js.eval("qd.data[0].length")
For i = 0 To slen - 1
For j = 0 To sslen - 1
Cells(i + 1, j + 1) = Replace(js.eval("qd.data[" & i & "][" & j & "]"), vbCrLf, "")
Next
Next
End With
End Sub
End If
Application.OnTime Time + TimeSerial(0, 1, 0), "test"
End Sub
这样弄怎么还是出不来数据,请问哪里出错了 |
|