|
- Sub Test()
- Dim html As Object, r As Object
- Dim i, j
- Set html = CreateObject("htmlfile")
- With CreateObject("msxml2.xmlhttp")
- .Open "GET", "http://money.finance.sina.com.cn/quotes_service/view/vMS_tradehistory.php?symbol=sh600292&date=2015-5-6", False
- .send
- html.body.innerhtml = StrConv(.responsebody, vbUnicode)
- End With
- Set r = html.all.tags("table")("datatbl").Rows
- For i = 0 To r.Length - 1
- For j = 0 To r(i).Cells.Length - 1
- Cells(i + 1, j + 1) = r(i).Cells(j).innertext
- Next j
- Next i
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|