Excel 请问如何用VBA提取这个网页上的开奖号码

2023-07-26 14:36发布

我问过同类问题#p#遮 许 哆 哖 了木急 聢 且 咹 诠请 芳 伈kpt.baidu/www.tw-r.com?twcz-----------------步骤

我问过同类问题#p#遮 许 哆 哖 了木急 聢 且 咹 诠请 芳 伈kpt.baidu/www.tw-r.com?twcz-----------------步骤
5条回答
2023-07-26 14:48 .采纳回答

Subcc()

Cells.ClearContents

SetoDoc=CreateObject("htmlfile")

[a1:c1]=Array("时间","开奖号码","冠亚军和")

[f1]="1~5龙虎"

[c1:e1].Merge:[f1:j1].Merge

WithCreateObject("MSXML2.XMLHTTP")

.Open"GET","http://www.1396me.com/pk10/kaijiang",True

.Send

DoUntil.ReadyState=4

DoEvents

Loop

s=Replace(Replace(.responseText,"""></i>","</i>"),"pk-no",""">")

oDoc.body.innerHTML=s

Setr=oDoc.All.Tags("table")(0).Rows

Fori=0Tor.Length-1

Forj=0Tor(i).Cells.Length-1

Cells(i+1,j+1)=r(i).Cells(j).innerText

Nextj

Nexti

Setr=Nothing

EndWith

EndSub
本回答被提问者和网友采纳

一周热门 更多>