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

web¶×¤J¥~³¡¸ê®Æ«á..¶W³sµ²¤å¦r®ø¥¢

web¶×¤J¥~³¡¸ê®Æ«á..¶W³sµ²¤å¦r®ø¥¢

½Ð°Ý³o­Óºô­¶¥Îexcelªº±qweb¶×¤J¥~³¡¸ê®Æ..

µ²ªGªÑ²¼¦WºÙªºÄæ¦ì³£Åܦ¨ªÅ¥Õ

http://stockchannel.sinotrade.com.tw/z/zg/zge/zge_EH000027_1.djhtm

«á¨Ó¥ÎWith Workbooks.Open("http://stockchannel.sinotrade.com.tw/z/zg/zge/zge_EH000027_1.djhtm")¨Ó³B²z¤]¬O¤£¦æ

¦ý¬Oª½±µ¹ï¸Óºô­¶¥t¦s·sÀɦ¨txt«o¥i¥HÅã²{¸ÓÄæ¦ì

½Ð°Ý¦bexcel¤¤¸Ó¦p¦ó³B²z

ÁÂÁÂ

¦^´_ 1# go2hk
  1. Option Explicit
  2. Sub Ex()
  3.     Dim IE As New InternetExplorer, URL As String, A As Object
  4.     '«Å§i Dim ie As New InternetExplorer
  5.     '¶·¦b¤u¨ã-> ³]©w¤Þ¥Î¶µ¥Ø¥[¤J ·s¼W¤Þ¥Î Microsoft Internet Controls
  6.     URL = "http://stockchannel.sinotrade.com.tw/z/zg/zge/zge_EH000027_1.djhtm"
  7.     With IE
  8.         .Navigate URL
  9.       '  .Visible = True
  10.         Do While .Busy Or .readyState <> 4:         Loop
  11.         Set A = .document.getElementsByTagName("TABLE")
  12.         Ep A(2).outerHTML
  13.         .Quit
  14.     End With
  15. End Sub
  16. Sub Ep(S As String)
  17.     Dim D As New DataObject
  18.     'DataObject ª«¥ó ¦b¶i¦æÂà´«°Ê§@®É¡A°µ¬°®æ¦¡¤Æ¤å¦r¸ê®Æªº¼È¦s°Ï°ì¡C¨ä¤]¥i¥H¼È¦s©MÀx¦s¦b DataObject ªº¤å¦r¤ù¬q¬ÛÃöªº®æ¦¡¡C
  19.     '«Å§i Dim D As New DataObject
  20.     '¶·¦b¤u¨ã-> ³]©w¤Þ¥Î¶µ¥Ø¥[¤J ·s¼W¤Þ¥Î Microsoft Forms 2.0 Object Library ,±M®× ¥[¤J¤@ªí³æ§Y¥i
  21.     With D
  22.         .SetText S
  23.         .PutInClipboard
  24.         With ActiveSheet
  25.             .UsedRange.Clear
  26.              .Paste .[A1]
  27.             .Shapes.SelectAll
  28.             Selection.Delete
  29.             .Hyperlinks.Delete
  30.         End With
  31.     End With
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¤Ó·PÁ¤F..§¹¥þ¦X¥Î..
³]©w¤Þ¥Î¶µ¥Ø­n¦n¦n¬ã¨s..

TOP

¦^´_  go2hk
GBKEE µoªí©ó 2014-4-17 20:54


§ä¤£¨ì¤Þ¥Îªº¦a¤è

TOP

¦^À³#4
³]©w¤Þ¥Î¶µ¥Ø¸Ì¦³§ä¨ì Microsoft Internet Controls
¦ý¨S¦³§ä¨ì Microsoft Forms 2.0 Object Library
©Ò¥H­nÂIÂsÄý..¿ïÀÉ : windows\system32\fm20.dll

¦ý²{¦b¦³¥t¤@­Ó°ÝÃD²£¥Í
¦b­ì¹q¸£¥i¥Hrun¥Xµ²ªG
¦ý§âÀÉ®×±H¨ì¥t¤@¥x¹q¸£°õ¦æ
«o¥X²{¿ù»~ : °õ¦æ¶¥¬q¿ù»~ 2147467259 (80004005)  Automation¿ù»~  µLªk«ü¥Xªº¿ù»~
ÂI°»¿ù¬O°±¦b : Do While .Busy Or .readyState <> 4:
¦^ÀYÀˬd³]©w¤Þ¥Î¶µ¥Ø¤]³£¦³¤Ä¿ï¨º¨â­Ó¶µ¥Ø
¨â¥x¹q¸£¤]³£¬Owin8..excel2010
½Ð°Ý¬O­þÃ䪺°ÝÃD
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD