|
本帖最后由 蓝天630902 于 2012-8-29 06:35 编辑
Sub 下载XML数据()
下载期号数
Dim ie As Object, nod, arr(1 To 5000, 1 To 32)
Set ie = CreateObject("Microsoft.XMLHTTP")
bb = Sheet2.Range("a65536").End(xlUp).Row
For p = 2 To bb
ie.Open "get", "http://zx.500wan.com/static/info/kaijiang/xml/ssq/" & Format(Sheet2.Cells(p, 1), "00000") & ".xml", False
ie.Send
i = 0
For Each nod In ie.responseXML.getElementsByTagName("xml")(0).ChildNodes
i = i + 1
arr(p, i) = nod.Text
Next
Next p
Sheet1.Range("a1:af" & bb) = arr
Sheet1.[a1:af1] = Split("PeriodicalNO,RedResult,OutBall,BlueResult,HappySunDayResult,ResultTime,EncashTime,Money1,Num1,Money2,Num2,Money3,Num3,Money4,Num4,Money5,Num5,Money6,Num6,HappySunDayMoney,HappySunDayNum,TotalMoney,CCMoney,AddCCMoney,HappyResult,HappyMoney,HappyNum,HappyCCMoney,BallsNum,RedFX,BlueFX,TiDian", ",")
End Sub
Sub 下载期号数()
Dim temp, s
With CreateObject("Microsoft.XMLHTTP")
.Open "GET", "http://lottery.sports.sohu.com/open/ssq.shtml", False
.Send
n = Range("a65536").End(xlUp).Row
temp = Split(.responsetext, "</option><")
For i = 1 To UBound(temp) - 1
s = Split(temp(i), ">")
Sheet2.Cells(UBound(temp) - i + 1, 1) = s(UBound(s))
Next i
End With
End Sub
|
评分
-
1
查看全部评分
-
|