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

[µo°Ý] Âd¶R¤¤¤ß¤T¤jªk¤H¶R½æª÷ÃB²Î­pªí¤Î¿Ä¸ê¾lÃBµLªk¤U¸ü

[µo°Ý] Âd¶R¤¤¤ß¤T¤jªk¤H¶R½æª÷ÃB²Î­pªí¤Î¿Ä¸ê¾lÃBµLªk¤U¸ü



¤£¦n·N«ä¡A½Ð°Ý¤@¤U«e½ú­Ì
¤p§Ì°Ñ¦Ò¥H¤U¤è¦¡¼g¤F¥N½Xµo¥Í¤W­±¨â±i¹Ï¡A¬õ®Ø³BµLªk¥¿±`¤U¸ü³øªí¤ºªº¼Æ¦r
ºÃ¦ü³o¨â­Óºô­¶¦³¾×¤U¨Ó¡A½Ð°Ý³o­Ó¦p¦ó±Æ°£
  1. Option Explicit
  2. Sub Ex_Âd¶R¤¤¤ß¤T¤jªk¤H¶R½æª÷ÃB²Î­pªí()
  3.     Dim i As Integer, S As Integer, k As Integer, A As Object, ii, j
  4.     With CreateObject("InternetExplorer.Application")
  5.        ' .Visible = True
  6.         '.Navigate "http://www.twse.com.tw/ch/trading/exchange/STOCK_DAY/STOCK_DAY_print.php?genpage=genpage/Report201503/201503_F3_1_8_2485.php&type=list"
  7.         .Navigate "http://www.tpex.org.tw/web/stock/3insti/3insti_summary/3itrdsum.php?l=zh-tw"
  8.         'http://www.twse.com.tw/ch/trading/fund/BFI82U/BFI82U.php
  9.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  10.         Ep .document.getElementsByTagName("div")(40).outerHTML
  11.         .Quit        'Ãö³¬ºô­¶
  12.     End With
  13. End Sub
  14. Sub Ep(S As String)
  15.     Dim D As New DataObject
  16.     'DataObject ª«¥ó ¦b¶i¦æÂà´«°Ê§@®É¡A°µ¬°®æ¦¡¤Æ¤å¦r¸ê®Æªº¼È¦s°Ï°ì¡C¨ä¤]¥i¥H¼È¦s©MÀx¦s¦b DataObject ªº¤å¦r¤ù¬q¬ÛÃöªº®æ¦¡¡C
  17.     '«Å§i Dim D As New DataObject '¶·¦b¤u¨ã-> ³]©w¤Þ¥Î¶µ¥Ø¥[¤J ·s¼W¤Þ¥Î Microsoft Forms 2.0 Object Library ,©Î©ó±M®× ¥[¤J¤@ªí³æ§Y¥i
  18.     With D
  19.         .SetText S
  20.         .PutInClipboard
  21.         With Sheets("ÃÒ¨é¤W¥«Âd¤T¤jªk¤H")
  22.             .Range("k6:z18").Clear
  23.             .Range("k6").Select
  24.             .PasteSpecial Format:="Unicode ¤å¦r"
  25.         End With
  26.     End With
  27. End Sub



  28. Option Explicit
  29. Sub Ex_Âd¶R¤¤¤ß«H¥Î¥æ©ö²Î­p()
  30.     Dim i As Integer, S As Integer, k As Integer, A As Object, ii, j
  31.     With CreateObject("InternetExplorer.Application")
  32.        ' .Visible = True
  33.         '.Navigate "http://www.twse.com.tw/ch/trading/exchange/STOCK_DAY/STOCK_DAY_print.php?genpage=genpage/Report201503/201503_F3_1_8_2485.php&type=list"
  34.         .Navigate "http://www.tpex.org.tw/web/stock/3insti/3insti_summary/3itrdsum.php?l=zh-tw"
  35.         .Navigate "http://www.tpex.org.tw/web/stock/margin_trading/margin_balance/margin_bal.php?l=zh-tw"
  36.         'http://www.tpex.org.tw/web/stock/margin_trading/margin_balance/margin_bal.php?l=zh-tw
  37.         'http://www.twse.com.tw/ch/trading/fund/BFI82U/BFI82U.php
  38.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  39.         Ep .document.getElementsByTagName("div")(8).outerHTML
  40.         .Quit        'Ãö³¬ºô­¶
  41.     End With
  42. End Sub
  43. Sub Ep(S As String)
  44.     Dim D As New DataObject
  45.     'DataObject ª«¥ó ¦b¶i¦æÂà´«°Ê§@®É¡A°µ¬°®æ¦¡¤Æ¤å¦r¸ê®Æªº¼È¦s°Ï°ì¡C¨ä¤]¥i¥H¼È¦s©MÀx¦s¦b DataObject ªº¤å¦r¤ù¬q¬ÛÃöªº®æ¦¡¡C
  46.     '«Å§i Dim D As New DataObject '¶·¦b¤u¨ã-> ³]©w¤Þ¥Î¶µ¥Ø¥[¤J ·s¼W¤Þ¥Î Microsoft Forms 2.0 Object Library ,©Î©ó±M®× ¥[¤J¤@ªí³æ§Y¥i
  47.     With D
  48.         .SetText S
  49.         .PutInClipboard
  50.         With Sheets("ÃÒ¨é¤W¥«Âd¤T¤jªk¤H")
  51.             .Range("K6:Z18").Clear
  52.             .Range("K6").Select
  53.             .PasteSpecial Format:="Unicode ¤å¦r"
  54.         End With
  55.     End With
  56. End Sub
½Æ»s¥N½X

¦^´_ 1# frantz

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

TOP



ÁÂÁÂGBKEE¤jªº¦^ÂÐ
¤p§Ì¬Q¤é´N¬O¥ý¨Ì·Ó³o¼Ë¤l¤U¥h¾Þ§@
·|¥X²{¦p¤W¹Ïªº°ÝÃD

¦^´_ 2# GBKEE

TOP

¦^´_ 3# frantz
  1. Ep .document.getElementsByTagName("table")(0).outerHTML
½Æ»s¥N½X
xp ,IE8 ¤U¸ü ¦p¹Ï¥¿±`,Àˬd¤@¤U§AªºIE

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

TOP

¦^´_ 4# GBKEE
¤p§Ì§Úªº¬Owin7*64 ie11

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD