ªð¦^¦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

¦^´_ 3# GBKEE


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

TOP

¦^´_ 2# joey0415


    ÁÂÁ±zªº¦^ÂÐ

TOP

¦^´_ 6# GBKEE


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

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD