- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 6# PKKO
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex_¤¤¤å¶Ã½X_GET()
- Dim strText As String
- Dim I As Integer, j As Integer, xTable As Object
- With CreateObject("msxml2.xmlhttp")
- .Open "GET", "http://mops.twse.com.tw/nas/t21/sii/t21sc03_107_4_0.html", False
- .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- .send
- strText = BinToStr(.responseBody, "BIG5") 'nª`·Nºô¶½s½X
- End With
- With CreateObject("htmlfile")
- .Write strText
- Set xTable = .all.tags("table")(2)
- With ActiveSheet
- .Cells.Clear
- For I = 0 To xTable.Rows.Length - 1
- For j = 0 To xTable.Rows(I).Cells.Length - 1
- .Cells(I + 1, j + 1) = xTable.Rows(I).Cells(j).innertext
- Next
- Next
- End With
- End With
- End Sub
- Function BinToStr(arrBin, strChrs)
- With CreateObject("ADODB.Stream")
- .Type = 2
- .Open
- .Writetext arrBin
- .Position = 0
- .Charset = strChrs
- BinToStr = .ReadText
- .Close
- End With
- End Function
½Æ»s¥N½X |
|