- ©«¤l
- 75
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 371
- ÂI¦W
- 1
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-5-4
- ³Ì«áµn¿ý
- 2024-6-4
|
Sub get_stock()
Dim Url, HTMLsourcecode, GetXml
Set HTMLsourcecode = CreateObject("htmlfile")
Set GetXml = CreateObject("msxml2.xmlhttp")
Url = "http://pscnetinvest.moneydj.com.tw/z/zc/zcq/zcqa/zcqa_2330.djhtm"
With GetXml
.Open "GET", Url, False
.Send
HTMLsourcecode.body.innerhtml = .Responsetext
Set Table = HTMLsourcecode.all.tags("table")(2).Rows
For i = 0 To Table.Length - 1
For j = 0 To Table(i).Cells.Length - 1
ActiveSheet.Cells(i + 1, j + 1) = Table(i).Cells(j).innertext
Next j
Next i
End With
Set HTMLsourcecode = Nothing 'ÄÀ©ñ°O¾ÐÅé
Set GetXml = Nothing
End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|