| ©«¤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 
         
 | 
                
| ¦^´_ 1# xu123 ¸Õ¸Õ¬Ý
 ½Æ»s¥N½XOption Explicit
Sub ¥x«ü´Á¦¨_¥æ¤À»ù_¥x«ü´Á_¹d¦ëºô() 'TXFD6
    Dim oXmlhttp As Object, oHtmldoc As Object, Url As String
    Dim xTable As Object, xRow As Object, R As Integer, I As Integer
    Set oXmlhttp = CreateObject("msxml2.xmlhttp")
    Set oHtmldoc = CreateObject("htmlfile")
    Url = "http://www.cnyes.com/twfutures/futTst.aspx?code=TXFD6 "
    With oXmlhttp
        .Open "POST", Url, False
        .Send
        oHtmldoc.write .responseText
    End With
    Set xTable = oHtmldoc.all.tags("table")(1)
    With ActiveSheet
        .UsedRange.Clear
        For Each xRow In xTable.Rows
            R = R + 1
            For I = 0 To xRow.Cells.Length - 1
                .Cells(R, I + 1) = xRow.Cells(I).INNERTEXT
            Next
        Next
    End With
End Sub
 | 
 |