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

ª½±µ§ì°£®§ªí¨ì¤u§@ªí¤¤¤£¥¿±`

ª½±µ§ì°£®§ªí¨ì¤u§@ªí¤¤¤£¥¿±`

ªÑ²¼¦WºÙ¤£¥¿±`
Sub Ä_¨Ó°£®§ªí()
Application.ScreenUpdating = False   '°£Åv°£®§ªí
Application.EnableEvents = False
Application.DisplayStatusBar = False
ActiveSheet.DisplayPageBreaks = False
    Dim i As Integer, S As Integer, k As Integer, j As Integer
    Dim Element
      With CreateObject("InternetExplorer.Application")
       ' .Visible = True           '¥iÅã¥Üºô­¶
       .Navigate "http://jdata.yuanta.com.tw/z/ze/zeb/zeb.djhtm"
        Do While .Busy Or .readyState <> 4: DoEvents: Loop
        Set Element = .Document.getElementsByTagName("table")
        On Error Resume Next
        Sheets("sheet1").Range("a:e").ClearContents
        With Sheets("sheet1")
                 For S = 2 To 2                    '¤w§ä¥Xºô­¶ªºtable¤º®e¦b 0-3 ¤¤
                For i = 1 To Element(S).Rows.Length - 1
                    k = k + 1
                   For j = 0 To 4   '¸ê®ÆªºÄæ¦ì¦@6¦ì
                        .Cells(k, j + 1) = Element(S).Rows(i).Cells(j).innerText
                    Next
                Next
            Next
        End With
       .Quit
    End With
    Set Element = Nothing
   
Application.DisplayStatusBar = True
End Sub
Book2.rar (20.52 KB)

Sub Click_1()
Dim ie
Sheets(1).Select
    Const url As String = "http://jdata.yuanta.com.tw/z/z ...
f3202 µoªí©ó 2017-6-22 13:09

ÁÂÁ¡A§Ú¥u­n«e5Äæ A-E ­n§ï¨º¨Ç¦a¤è©O?

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD