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

[µo°Ý] ºô­¶¤U¸ü«á¨S¦³ªF¦è

[µo°Ý] ºô­¶¤U¸ü«á¨S¦³ªF¦è

¦U¦ì¦n
µ{¦¡½X¦p¤U¡A¤U¸ü¸ê®Æ«á¡A¬OªÅªÅªº¡A¤£ª¾¸Ó§ï­þ
©Ò¥H·Q½Ð¦U¦ìÀ°À°¦£
ÁÂÁÂ!! ·P®¦
  1. Sub abc()
  2.     Dim Theurl As String, Sdate
  3.     Dim URL As String, xDate As String, A As Date
  4.     A = Range("A2").Value
  5.     xDate = Format(A, "E/MM/DD")
  6.     Theurl = "http://www.otc.org.tw/ch/stock/3insti/DAILY_TradE/3itrade_download.php?t=D&d=" & xDate & "&s=0"


  7.     With ActiveSheet.QueryTables.Add(Connection:="URL;" & Theurl, Destination:=Range("B3"))
  8.         .BackgroundQuery = True
  9.         .RefreshStyle = xlOverwriteCells
  10.         .RefreshPeriod = 0
  11.         .AdjustColumnWidth = False
  12.         .WebSelectionType = xlSpecifiedTables
  13.         .WebFormatting = xlWebFormattingNone
  14.         '.WebTables = "1,2,3,4"
  15.         .WebDisableDateRecognition = True         'Ãö³¬¤é´Á¿ëÃÑ
  16.         .Refresh BackgroundQuery:=False
  17.         .ResultRange.Columns(1).TextToColumns Destination:=.ResultRange.Cells(1), DataType:=xlDelimited, _
  18.                 TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
  19.                 Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
  20.                 :=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
  21.                 Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1 _
  22.                 ), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array _
  23.                 (20, 1)), TrailingMinusNumbers:=True
  24.             'TextToColumns ¤èªk (¸ê®Æ­åªR)ªº°Ñ¼Æ¥i¿ý»s±o¨ì
  25.             'ResultRange.Columns(1):weby¸ê®Æªº²Ä¤@Äæ
  26.             'ResultRange.Cells(1)  :weby¸ê®Æªº²Ä¤@­ÓCells(Àx¦s®æ)
  27.             '.Delete
  28.             
  29.      


  30.     End With
  31. End Sub
½Æ»s¥N½X

¦^´_ 1# pupai
ºô§}¤£¹ï
  1. Sub ¥¨¶°1()
  2.     With ActiveSheet.QueryTables.Add(Connection:= _
  3.         "URL;http://www.gretai.org.tw/web/stock/3insti/daily_trade/3itrade_print.php?l=zh-tw&t=D&d=103/11/28&s=0,asc,0" _
  4.         , Destination:=Range("$A$1"))
  5.         .WebFormatting = xlWebFormattingNone
  6.         .WebPreFormattedTextToColumns = True
  7.         .Refresh BackgroundQuery:=False
  8.         .Delete
  9.     End With
  10. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-12-5 15:31 ½s¿è

¦^´_ 2# joey0415

ºô§}¤£¹ï
Workbooks.Open ("http://www.gretai.org.tw/web/stock/3insti/daily_trade/3itrade_print.php?l=zh-tw&t=D&d=103/11/28&s=0,asc,0")
    Workbooks.Open ("http://www.gretai.org.tw/web/stock/3insti/daily_trade/3itrade_hedge_download.php?l=zh-tw&t=D&d=103/12/03&s=0,asc,0")
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE


    ½Ð°ÝG¤j
±zªº¤è¦¡­n¦p¦ó­×§ï
¥i§_¦A¸É¥R»¡©ú
ÁÂÁÂ!!

TOP

¦^´_ 2# joey0415


    ÁÂÁ±zªº¦^ÂÐ

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-12-8 09:51 ½s¿è

¦^´_ 4# pupai
¥i¥Î¶}±ÒÀɮתº¤è¦¡
  1. Option Explicit
  2. Sub abc()
  3.     Dim Theurl As String, xDate As String, AR()
  4.     Range("A2") = "2014/12/4"  
  5.     xDate = Format(Range("A2"), "E/MM/DD")
  6.     Theurl = "http://www.gretai.org.tw/web/stock/3insti/daily_trade/3itrade_hedge_download.php?l=zh-tw&t=D&d=" & xDate '& "&s=0"
  7.             
  8.     Application.ScreenUpdating = False
  9.     With Workbooks.Open(Theurl)
  10.         AR = .Sheets(1).UsedRange.Value
  11.         .Close False
  12.     End With
  13.     With ActiveSheet
  14.         .UsedRange.Clear
  15.         .[A1].Resize(UBound(AR, 1), UBound(AR, 2)) = AR
  16.     End With
  17.     Application.ScreenUpdating = True
  18. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# GBKEE


   G ¤j
¤F¸Ñ   ·P®¦!!

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD