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

·Q­nÀu¤Æºô¸ôª¦¨ú¿ïªÑºô¯¸¸ê®Æ

¥»©«³Ì«á¥Ñ quickfixer ©ó 2021-7-15 14:02 ½s¿è

¦^´_ 1# vuptp6

°õ¦ætest
    Sub test()
    Dim getxml As Object, url As String, temp, t As Double
    t = Timer
    Set getxml = CreateObject("msxml2.xmlhttp")
    url = "https://fubon-ebrokerdj.fbs.com.tw/Z/ZC/ZCL/CZCL3.DJBCD?A=2330&B=Y"
    getxml.Open "GET", url, False
    getxml.send
    temp = Split(getxml.responsetext, " ")
    Application.ScreenUpdating = False
    Cells.Clear
    For i = 1 To 5
    Call col(i, Split(temp(Choose(i, 0, 5, 6, 2, 3)), ","))
    Next i
    Set getxml = Nothing
    Range("f1") = Timer - t & "¬í"
    Application.ScreenUpdating = True

End Sub

Sub col(c, temp)
    r = 1
    For j = UBound(temp) To 0 Step -1
    r = r + 1
        If c = 1 Then Cells(r, c) = "'" & temp(j) Else Cells(r, c) = temp(j)
    Next j
End Sub

TOP

¦^´_ 4# vuptp6



¬O±q chrome F12 °l踨¨ìªº¸ê®Æ¨Ó·½ºô§}

¨C¤@¦æ³£¬Ý¤£À´,¨º§A¥i¯à­n±qvba¤Jªù¾Ç²ß,¥[ªo:)

TOP

¦^´_ 6# vuptp6


    Sub fubon()
   
    Dim URL As String, Html As Object, GetXml As Object, table, i As Integer, j As Integer, t As Double
    Cells.Clear
    t = Timer
    Application.ScreenUpdating = False
    Set Html = CreateObject("htmlfile")
    Set GetXml = CreateObject("msxml2.xmlhttp")
    URL = "https://fubon-ebrokerdj.fbs.com.tw/z/zc/zcl/zcl.djhtm?a=2330&c=2019-1-1&d=2019-12-31"
   
    With GetXml
        .Open "GET", URL, False
        .send
        Html.body.innerhtml = .responsetext
        Set table = Html.all.tags("table")(2).Rows
        For i = 1 To table.Length - 1
            For j = 0 To table(i).Cells.Length - 2
                Cells(i, j + 1) = Trim(table(i).Cells(j).innertext)
            Next j
        Next i
    End With
    Rows("1:5").Delete Shift:=xlUp
    Range("D:D,E:E,H:H,I:I,J:J").Delete Shift:=xlToLeft
    Application.ScreenUpdating = True
    Range("f1") = Timer - t & "¬í"
    Cells.Columns.AutoFit
    Set Html = Nothing
    Set GetXml = Nothing
        
End Sub


stock.wearn.com §ï2¦æ,§R°£¦CÄ椣­n,¶Ã½X¥Î¤å¦r»\¹L´N¦n,¨ä¾l¦P¤W

URL = "https://stock.wearn.com/cdata.asp?Year=110&month=07&kind=2330"
Set table = Html.all.tags("table")(0).Rows

TOP

¦^´_ 7# quickfixer


    stock.wearn.com º|§ï¤@¦æ
.Cells.Length - 2  §ï .Cells.Length - 1

TOP

        ÀR«ä¦Û¦b : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD