- ©«¤l
- 184
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 407
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-8-19
- ³Ì«áµn¿ý
- 2024-11-1
|
¦^´_ 2# GBKEE
½Ð°ÝG¤j
§Ú·Qn«ü©w¤é´Á¤U¸ü
¦ý¤@ª½¨S¯à¦¨¥\
¥i¥HÀ°§Ú¬Ý¬Ý³Â
ÁÂÁÂ!!- Sub EXC()
- Dim Theurl As String, Sdate
- Dim URL As String, xDate As Date, A As Date
-
- A = Range("A1").Value
- xDate = Format(A, "E/M/D")
- Theurl = "http://www.otc.org.tw/ch/stock/3insti/DAILY_TradE/3itrade_download.php?t=D&d=& xDate &s=0"
-
- With ActiveSheet.QueryTables.Add(Connection:="URL;" & Theurl, Destination:=Range("A2"))
- .BackgroundQuery = True
- .RefreshStyle = xlOverwriteCells
- .RefreshPeriod = 0
- .AdjustColumnWidth = False
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- '.WebTables = "1,2,3,4"
- .WebDisableDateRecognition = True 'Ãö³¬¤é´Á¿ëÃÑ
- .Refresh BackgroundQuery:=False
- .ResultRange.Columns(1).TextToColumns Destination:=.ResultRange.Cells(1), DataType:=xlDelimited, _
- TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
- Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
- :=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
- Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1 _
- ), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array _
- (20, 1)), TrailingMinusNumbers:=True
- 'TextToColumns ¤èªk (¸ê®ÆåªR)ªº°Ñ¼Æ¥i¿ý»s±o¨ì
- 'ResultRange.Columns(1):weby¸ê®Æªº²Ä¤@Äæ
- 'ResultRange.Cells(1) :weby¸ê®Æªº²Ä¤@ÓCells(Àx¦s®æ)
- .Delete
- End With
- End Sub
½Æ»s¥N½X |
|