- ©«¤l
- 1572
- ¥DÃD
- 16
- ºëµØ
- 2
- ¿n¤À
- 1521
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2016-1-13
|
1101~9999,»Ýn«Ü¦h®É¶¡(°²³]4hr)
¤£·|§a¡Hn³o»ò¦h®É¶¡¡H
1101~9999¤¤¯u¥¿¦³¼Æ¾Úªº¥u¦³945µ§
§Ú°µ¦P¼Ëªº¾Þ§@¥u¦³´X¤ÀÄÁ¡C- Sub Macro1()
- Dim arr(), i%, j%, x, y
- t = Timer
- ActiveSheet.UsedRange.Offset(1, 0) = ""
- For i = 1101 To 9999
- With CreateObject("Microsoft.XMLHTTP")
- .Open "get", "http://tw.stock.yahoo.com/q/q?s=" & i, False
- .send
- On Error Resume Next
- k = .responsetext
- x = Split(Split(k, " href=""/q/bc?s=" & i & "")(1), "<")(0)
- If Err.Number = 0 Then
- m = m + 1
- ReDim Preserve arr(1 To 11, 1 To m)
- arr(1, m) = Mid(x, 2)
- For j = 1 To 10
- y = Split(Split(k, "<td align=""center"" bgcolor=""#FFFfff"" nowrap>")(j), "</")(0)
- arr(j + 1, m) = y
- Next
- arr(6, m) = Split(arr(6, m), ">")(1)
- End If
- End With
- Next
- Cells(2, 1).Resize(m, 11) = Application.Transpose(arr)
- MsgBox Timer - t
- End Sub
½Æ»s¥N½X |
|