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

[µo°Ý] ½Ð±Ð ¦p¦ó¦bEXCELL¨ú±o¸Óºô¯¸¤§"§Y®É¦ô­p²b­È"

[µo°Ý] ½Ð±Ð ¦p¦ó¦bEXCELL¨ú±o¸Óºô¯¸¤§"§Y®É¦ô­p²b­È"

½Ð±Ð ¦p¦ó¦bEXCELL¨ú±o¸Óºô¯¸¤§"§Y®É¦ô­p²b­È"     http://www.p-shares.com/#/RtNav/Index
§Ú¥u¯à§ì¨ì¤@¨ÇµL¥Îªº¤å¦r(¤º®e¦p¤U)
¡i¤¸¤j§ë«H¿W¥ß¸gÀçºÞ²z¡j¥»°òª÷¸gª÷ºÞ·|®Ö­ã©Î¦P·N¥Í®Ä¡A±©¤£ªí¥Üµ´µL­·ÀI¡C¥»¤½¥q¥H©¹¤§¸g²zÁZ®Ä¡A ¤£«OÃÒ¥»°òª÷¤§³Ì§C§ë¸ê¦¬¯q¡F¥»¤½¥q°£ºÉµ½¨}ºÞ²z¤H¤§ª`·N¸q°È¥~¡A¤£­t³d¥»°òª÷¤§¬ÕÁ«¡A¥ç¤£«OÃҳ̧C¤§ ¦¬¯q¡A§ë¸ê¤H¥ÓÁÊ«eÀ³¸Ô¾\°òª÷¤½¶}»¡©ú®Ñ¡C¥»¤å´£¤Î¤§¸gÀÙ¨«¶Õ¹w´ú¤£¥²µM¥Nªí°òª÷¤§ÁZ®Ä¡A°òª÷§ë¸ê­·ÀI ½Ð¸Ô¾\°òª÷¤½¶}»¡©ú®Ñ¡C¦³Ãö°òª÷À³­t¾á¤§¬ÛÃö¶O¥Î¡A¤w´¦ÅS©ó°òª÷¤½¶}»¡©ú®Ñ¤¤¡A§ë¸ê¤H¥i¦V¥»¤½¥q¤Î°òª÷ ¤§¾P°â¾÷ºc¯Á¨ú¡A©Î¦Ü¤½¶}¸ê°TÆ[´ú¯¸¤Î ¥»¤½¥qºô¯¸ ¤¤¬d¸ß¡C°òª÷«D¦s´Ú©Î«OÀI¡A¬GµL¨ü¦s´Ú«OÀI¡B«OÀI¦w©w°òª÷©Î¨ä¥L¬ÛÃö«O»Ù¾÷¨î¤§«O»Ù¡C

³Â·Ð°ª¤â«ü¾É§Ú¦p¦ó©óEXCELL¤º±N¦¹ºô­¶¸ü¤J(¦p¹Ï) ¦b¦¹¥ýÁÂÁ±z¤F

¦^´_ 32# yan2463

³o°¦µ{¦¡¤£¾A¦X©w®É°õ¦æ¡A¦ýÁÙ¬O¶K¤W¨Óµ¹§A°Ñ¦Ò!!
  1. Option Explicit
  2. Public doneT As Boolean
  3. Sub Exnets123() '
  4.     Dim E As Object, tTime, tabtxt As String
  5.     With CreateObject("InternetExplorer.Application")
  6.         '.Visible = True 'False
  7.         .navigate "http://www.yuantaetfs.com/#/RtNav/Index"
  8.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  9.         Application.SendKeys "~", True   '«ö¤U¦P·NÁä
  10.         '.document.getElementsByTagName("button")(0).Click  '«ö¤U¦P·NÁä
  11.         tTime = Timer
  12.         Do
  13.             Set E = .document.getElementsByTagName("TABLE")(21)  '§ï(22)¤]¥i¡AE.all.Length="¼Æ¶q­n¸òµÛ§ï"
  14.             DoEvents
  15.             If Timer - tTime > 5 Then MsgBox "½Ð­×§ï E.all.Length =" & E.all.Length: Exit Do  '½T©wµL»~«á¥iÃö³¬
  16.         Loop Until Not E Is Nothing And E.all.Length = 415  '¼Æ¶q¥i¯à·|¤£¤Ó¤@¼Ë
  17.         tabtxt = .document.getElementsByTagName("TABLE")(21).outerHTML
  18.         tabtxt = Replace(tabtxt, "<span class=""ng-hide"" ng-show=""o.navFluct>0"">¡¶</span>", "")
  19.         tabtxt = Replace(tabtxt, "<span class=""ng-hide"" ng-show=""o.navFluct<0"">¡¿</span>", "")
  20.         tabtxt = Replace(tabtxt, "<span class=""ng-hide"" ng-show=""o.priceFluct>0"">¡¶</span>", "")
  21.         tabtxt = Replace(tabtxt, "<span class=""ng-hide"" ng-show=""o.priceFluct<0"">¡¿</span>", "")
  22.         .document.body.innerHTML = tabtxt
  23.         .ExecWB 17, 2       '  Select All
  24.         .ExecWB 12, 2       '  Copy selection
  25.         With ActiveSheet    ''­×§ï§A­n¶K¤Wªº¤u§@ªí
  26.             .Cells.Clear
  27.             .[a1].Select
  28.             .PasteSpecial 'NoHTMLFormatting:=True  '(¨ú®øµù¸Ñ¡A§ï¦¨¯Â¤å¦r¶K¤W)
  29.         End With
  30.         'Selection.Columns.AutoFit
  31.         .Quit        'Ãö³¬ºô­¶
  32.     End With
  33.     If doneT = True Then
  34.         Application.OnTime Time + #12:00:10 AM#, "Exnets123" '¶¡¹j¦h¤Ö®É¶¡¶}±Ò
  35.     End If
  36. End Sub
  37. Sub ¶}Ãö() '¥t³]«ö¶s
  38. doneT = IIf(doneT = True, False, True)  '¦Û¦æ­×§ï¾A¦Xªº¤è¦¡
  39. MsgBox IIf(doneT = True, "©w®É¶}±Ò", "©w®ÉÃö³¬") '¶}±Ò¦A¥h°õ¦æExnets123µ{¦¡´N¯à¶¡¹j°õ¦æ¡AÃö³¬´N¯à¨ú®ø¶¡¹j°õ¦æ
  40. End Sub
½Æ»s¥N½X

TOP

¦^´_ 30# yan2463

§Ú¦³¤U¸ü25¼ÓªºVBA,·Q¥H³o­ÓÀɮשµ¦ù
1.¦]»Ý­n«ö¶s¤~·|§ó·s,·Q½Ð°Ý¬O§_¦³¨C¤@¤À©Î¤Q¤ÀÄÁÀÉ®×¥i¦Û¦æ§ó·s
2.¦p­n¥Î«ö¶s§ó·s,¦p¦ó¤~¯à¦b¦bA¤u§@ªí§ó·s¶s,¦b¤u§@ªíB§ó·s
3.¹ïVBA¯uªº¤£¼ô,©Ò¥H¤£ª¾³o¼Ë°Ý¬O§_OK

TOP

¦^´_ 1# yan2463

yan2463 ½Ð°Ý±zªº°ÝÃD¸Ñ¨M¤F¶Ü?
yan2463 »¡¡G
¦^´_ lcctno §Úªº°ÝÃD©|¥¼¸Ñ¨M

¦^´_ yan2463
½Ð¬Ý 26¼Ó
  http://forum.twbts.com/redirect. ... 5&fromuid=21526

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2015/7/23 10:23): ½Ðpo¤Wµ{¦¡½X

¦^´_ 25# no3-taco

½Ð°Ý¦pªG·Q¨C1¤ÀÄÁ,©Î¨C¤Q¤ÀÄÁ¦Û°Ê§ó·s¤@¦¸,¸Ó¦p¦ó§ï

TOP

¦^´_ 28# GBKEE

¤§«e¦³¤@½g©«¤l¤]¬O¥d¦b³o¸Ì¡A¤µ¤Ñ²×©ó¬Ý¨ì§ó¦nªº¸Ñ¨M¿ìªk¤F¡C:lol

TOP

¦^´_ 27# no3-taco

Application.Wait Now + #12:00:02 AM#   '¸g±`¨S§ì¨ì§ï2¬í

ºô­¶ÀW¼e¤U¸ü³t«×¸ò¤£¤Wµ{¦¡°õ¦æªº³t«×©Ò­P
¥i­×§ï¦p¤U
  1.   'Application.Wait Now + #12:00:01 AM#
  2.         Do
  3.             Set E = .Document.getElementsByTagName("TABLE")(21)
  4.         Loop Until Not E Is Nothing And E.ALL.Length = 431
  5.         
  6.          .Document.body.innerHTML = E.outerHTML
½Æ»s¥N½X
¦p¹Ï¥Ü µ{¦¡·|°±¦b¤¤Â_ÂI


·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 26# lcctno

.Visible = True §ï¦¨¤U­±
.Visible = False    '¥i¥HÁôÂÃie

¦pªG°¸º¸§ì¤£¨ì¡A¦h«ö´X¤U¡A©ÎªÌ§â®É¶¡¼W¥[¨ì¨â¬í
Application.Wait Now + #12:00:02 AM#   '¸g±`¨S§ì¨ì§ï2¬í

TOP

¦^´_ 25# no3-taco


«z ¯uªº¦¨¥\¤F «D±`«D±`ªº·PÁ±zªº§V¤O(À°§U)  §Ú±o¦n¦n¬ã¨s±z´£¨Ñªº¤º®e¤F



¥i¥Î¤§´ú¸ÕÀÉ
§Y®É¦ô­p²b­È.zip (9.49 KB)

TOP

§Ú¤£¤Ó·|¥Î¦^´_¡A¦A¸Õ¬Ý¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim E As Object, myItems As Object, myitem
  4.     With CreateObject("InternetExplorer.Application")
  5.         .Visible = True
  6.         .Navigate "http://www.yuantaetfs.com/#/RtNav/Index"
  7.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  8.         'Application.Wait Now + #12:00:01 AM#   '¦³¿ù¦b¶}±Ò
  9.         Set myItems = .Document.getElementsByTagName("button")
  10.         For Each myitem In myItems
  11.             If myitem.Name = "Agree" Then
  12.                 myitem.Click                              '«ö¤U°e¥X¬d¸ß«ö¶s
  13.             End If
  14.         Next
  15.         Application.Wait Now + #12:00:01 AM#
  16.         Set E = .Document.getElementsByTagName("TABLE")(21)
  17.          .Document.body.innerHTML = E.outerHTML
  18.         .ExecWB 17, 2       '  Select All
  19.         .ExecWB 12, 2       '  Copy selection
  20.         With ActiveSheet
  21.             .Cells.Clear
  22.             .[A1].Select
  23.             .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
  24.         End With
  25.         .Quit        'Ãö³¬ºô­¶
  26.     End With
  27. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦pÆp¥Û¡j®É¶¡¹ï¤@­Ó¦³´¼¼zªº¤H¦Ó¨¥¡A´N¦pÆp¥Û¯ë¬Ã¶Q¡F¦ý¹ï·M¤H¨Ó»¡¡A«o¹³¬O¤@§âªd¤g¡A¤@ÂI»ù­È¤]¨S¦³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD