ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

ºô­¶ÂàÀÉ°ÝÃD !!

ºô­¶ÂàÀÉ°ÝÃD !!

¥Ø«e¨Ï¥Î QueryTables ¤U¸ü¸ê®Æ , ¦ý°õ¦æ¶O®É ( ¤£ª¾ºô­¶/µwÅé/ºô¸ô....¨º°ÝÃD ) ,
¸ÕµÛ¾Ç§ï¥Î¥H¤U¤èªk¶i¦æ , ¥Ø«emyHTML¦³§ì¨ì¸ê®Æ , ¦ýmyTables¤¤«h¨S¦³¸ê®Æ ( ¨Ì°Ñ¦Ò¤è¦¡¸ÕµÛ¸ÑªRºô­¶°Ñ¼Æ , ¤´µL¸Ñ )
½Ð°Ý¥H¤U»yªk¨º¦³°ÝÃD ??


Sub Test()
    Dim myXML As Object
    Set myXML = CreateObject("Microsoft.XMLHTTP")
   
    Dim myHTML As Object
    Set myHTML = CreateObject("HTMLfile")
   
    With myXML
        .Open "GET", "https://mops.twse.com.tw/server-java/t164sb01?step=1&CO_ID=1723&SYEAR=2019&SSEASON=1&REPORT_ID=C", False
        .send
        
        myHTML.body.innerHTML = .responseText
        
        t = 0
        'Call delay(3)
        Set myTables = myHTML.getElementsByTagName("table")

        For Each myTable In myTables
            For Each myRow In myTable.Rows
                For Each myCell In myRow.Cells
                    Debug.Print myCell.innerText & "---" & t
      
                Next
        
            Next
            t = t + 1
        Next
        
    End With

    Set myXML = Nothing
    Set myHTML = Nothing
   
End Sub

        ÀR«ä¦Û¦b : ¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí ¤W¤@¥DÃD