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

[µo°Ý] ¤U¸ü°ÝÃD

¦^´_ 5# spermbank


    ­Y¬O¥ÎGoogle Chrome¬O§âInternetExplorer.Application§ï¦¨¤°»ò©O?
    ºô­¶¬O§_¤£­nÅã¥Ü´N½Æ»s¦Ü¤À­¶©O? ÁÂÁ¡C

TOP

¦^´_ 4# GBKEE

Option Explicit
Sub °ò¥»¥«ªp³ø¾Éºô¯¸()
    Sheets("¤u§@ªí3").Select
    Dim xlVbTable(1 To 2) As Object, R As Integer, C As Integer, i As Variant, Y As Integer
    With CreateObject("InternetExplorer.Application")
        .Visible = True
       .Navigate "http://newmis.twse.com.tw/stock/fibest.jsp?stock=5490"
        Application.Wait Now + TimeValue("00:00:02")
        Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
        Set xlVbTable(1) = .Document.getElementById("hor-minimalist-a")
        Set xlVbTable(2) = .Document.getElementById("hor-minimalist-b")
        On Error Resume Next
        With ActiveSheet
            .Cells.Clear
            Y = 1
            For i = 1 To 2
                For R = 0 To xlVbTable(i).Rows.Length - 1
                    For C = 0 To xlVbTable(i).Rows(R).all.Length - 1
                        .Cells(Y, C + 1) = xlVbTable(i).Rows(R).Cells(C).innertext
                    Next
                    Y = Y + 1
                Next
            Next
        End With
       .Quit
    End With
End Sub

TOP

¦^´_ 3# spermbank
·|µo¥Í""µLªk¨C¦¸""¸ê®Æ§¹¥þ½Æ»s¦Ü¤À­¶,¶K¤W§Aªºµ{¦¡½X¬Ý¬Ý
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ spermbank ©ó 2013-9-6 14:15 ½s¿è

¦^´_ 2# GBKEE


    ·PÁÂG¤j¡A¦ý¬O§Úµo²{­Ó°ÝÃD¡A¦]¬°³o­Óºô¯¸¶}±Ò«á¡A·|Ū¨ú§Y®É¸ê®Æ¡A­Yª½±µ°õ¦æ¥¨¶°¡A³t«×¹L§Ö¡A·|µo¥Í""µLªk¨C¦¸""¸ê®Æ§¹¥þ½Æ»s¦Ü¤À­¶
    §Ú§Q¥ÎApplication.Wait Now + TimeValue("00:00:02")¨Ó¨Ïºô§}°±¯d2¬íµ¥«Ýºô­¶¸ê®ÆŪ¤J¸ê®Æ¦A½Æ»s¦Ü¤À­¶¡AÁöµM¥i¥H´£°ª¤@ÂI¸ê®Æ§¹¥þ½Æ»s
    ¥i¬OÁÙ¬O¦³®ÉµLªk§¹¥þŪ¨ì¡A¬O§_¦³¤°»ò§PÂ_¤è¦¡¡AÁÙ¬O­þÃ䦳°ÝÃD©O?ÁÂÁ¡C
   
    ­Y¬O¥ÎGoogle Chrome¬O§âInternetExplorer.Application§ï¦¨¤°»ò©O?
    ºô­¶¬O§_¤£­nÅã¥Ü´N½Æ»s¦Ü¤À­¶©O? ÁÂÁ¡C

TOP

¦^´_ 1# spermbank
µ¹§A¤U¸üªºµ{¦¡½X ,¨ä¾lªº°ÝÃD¥i¹î¬Ý¥»°Q½×°Ïªº¥DÃD,¥[¥H²Õ¦X(¦Û¤v¦h½m²ß vba ·|¶i¨B)
  1. Option Explicit
  2. Sub °ò¥»¥«ªp³ø¾Éºô¯¸()
  3.     Dim xlVbTable(1 To 2) As Object, R As Integer, C As Integer, i As Variant, Y As Integer
  4.     With CreateObject("InternetExplorer.Application")
  5.         .Visible = True
  6.        .Navigate "http://newmis.twse.com.tw/stock/fibest.jsp?stock=1101"
  7.         Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
  8.         Set xlVbTable(1) = .Document.getElementById("hor-minimalist-a")
  9.         Set xlVbTable(2) = .Document.getElementById("hor-minimalist-b")
  10.         On Error Resume Next
  11.         With ActiveSheet
  12.             .Cells.Clear
  13.             Y = 1
  14.             For i = 1 To 2
  15.                 For R = 0 To xlVbTable(i).Rows.Length - 1
  16.                     For C = 0 To xlVbTable(i).Rows(R).all.Length - 1
  17.                         .Cells(Y, C + 1) = xlVbTable(i).Rows(R).Cells(C).innertext
  18.                     Next
  19.                     Y = Y + 1
  20.                 Next
  21.             Next
  22.         End With
  23.        .Quit
  24.     End With
  25. End Sub
  26.    
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD