| ©«¤l5923 ¥DÃD13 ºëµØ1 ¿n¤À5986 ÂI¦W0  §@·~¨t²Îwin10 ³nÅ骩¥»Office 2010 ¾\ŪÅv150 ©Ê§O¨k ¨Ó¦Û¥xÆW°ò¶© µù¥U®É¶¡2010-5-1 ³Ì«áµn¿ý2022-1-23 
         
 | 
                
| ¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-3-31 18:38 ½s¿è 
 ¦^´_ 13# HSIEN6001
 §R±¼ encodeURIComponent=1
 
 ¦^´_ 14# HSIEN6001
 ¦³ diabo  ´£¨Ñªººô§}¦n¿ì¨Ç
 ½Æ»s¥N½XOption Explicit
Sub Ex()
Dim ie As Object, aa As Object, k As Integer, xx As Integer, i As Integer, j As Integer
ActiveSheet.Cells.Clear
Set ie = CreateObject("InternetExplorer.Application")
    ie.Navigate "http://mops.twse.com.tw/mops/web/ajax_t51sb13?step=1&firstin=1&off=1&TYPEK=sii&year=100&season=04"
     Do While ie.Busy Or ie.ReadyState <> 4:   DoEvents:     Loop
    On Error Resume Next
    Set aa = ie.Document.getelementsbytagname("table")   'ªí®æ¸ê®Æ°Ï
     k = 1
    On Error Resume Next
        For xx = 0 To aa.Length - 1
        '§ä¨ì«á×§ï For xx = ??? To aa.Length - 1
            For i = 0 To aa(xx).Rows.Length - 1      '¼g¤J¸ê®Æ
                Cells(k, 1) = "Table" & xx
                k = k + 1                            '¦C¼Æ
                For j = 0 To 19
                    Application.StatusBar = "¤U¸ü¸ê®Æ¤¤ ..." & k - 1
                    Cells(k, j + 2) = aa(xx).Rows(i).Cells(j).innertext
                Next
            Next
        Next
    ie.Quit
End Sub
 | 
 |