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

[µo°Ý] ½Ð±Ð³oºô­¶ªþ¹Ïªí®æ¬O¦b²Ä´X???(table)

½Ð±Ð³oºô­¶­nª½±µ¶×¤J¤u§@ªí­n¦p¦ó§ï??

https://tw.stock.yahoo.com/d/i/rank.php?t=up&e=tse
Sub test()
    Set Ie = CreateObject("InternetExplorer.Application")
    Ie.Visible = True
       Ie.Navigate "https://tw.stock.yahoo.com/d/i/rank.php?t=up&e=tse"
Do While Ie.Busy Or Ie.ReadyState <> 4: DoEvents: Loop

    Dim I As Integer, S As Integer, k As Integer, J As Integer
     Dim Element
    Set Element = Ie.document.getelementsbytagname("table")
    With Sheets("sheet2")
      .Range("a1:f30").ClearContents
        For S = 2 To 2                    '¤w§ä¥Xºô­¶ªºtable¤º®e¦b 2 ¤¤
            For I = 0 To Element(S).Rows.Length - 1
                k = k + 1
                For J = 0 To Element(S).Rows(I).Cells.Length - 1   '¸ê®ÆªºÄæ¦ì¦@6¦ì
                .Cells(k, J + 1) = Element(S).Rows(I).Cells(J).innerText
                Next
            Next
        Next

    End With
    Set Element = Nothing
               
Ie.Quit
End Sub

TOP

¤w¸Ñ¨M...........

TOP

[µo°Ý] ½Ð±Ð³oºô­¶ªþ¹Ïªí®æ¬O¦b²Ä´X???(table)

https://pchome.megatime.com.tw/rank/sto0/ock03.html

½Ð±Ð³oºô­¶ªþ¹Ïªí®æ¬O¦b²Ä´X???(table)

¦^´_  t8899
GBKEE µoªí©ó 2020-5-10 15:13


¤S¾Ç²ß¨ì·sªº§ìªk, ÁÂÁ«ü¾É!

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD