|
本帖最后由 YZC51 于 2015-10-29 22:50 编辑
请测试
- <P>Sub yzc51()</P>
- <P> Dim strText As String
- Cells.Clear
- '[a2:l21] = ""
- URL = "http://basic.10jqka.com.cn/600121/"
- With CreateObject("MSXML2.XMLHTTP")
- .Open "GET", URL, False
- .setRequestHeader "Connection", "keep-alive"
- .Send
- sText = .responsetext
- End With
- 'For i = 1 To 5
- strText = "<table" & Split(Split(sText, "<table")(3), "</table>")(0) & "</table>"
- ' Next i
-
- With CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
- .SetText strText
- .PutInClipboard
- End With
-
- Range("A2").Select
- ActiveSheet.Paste
-
- ' Debug.Print Left(sText, 2000)
-
- [a1] = Replace(Split(Split(sText, "<h2>")(1), "</h2>")(0), " ", " ")
- ' Debug.Print webBbro1.LocationName
- End Sub</P>
复制代码 |
|