- ©«¤l
- 96
- ¥DÃD
- 18
- ºëµØ
- 0
- ¿n¤À
- 125
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2014-3-23
- ³Ì«áµn¿ý
- 2022-8-2
|
[µo°Ý] 쥻°õ¦æ¥¿±`¦ý¹j¤Ñ«oÅܲ§±`ªºµ{¦¡½X
¥»©«³Ì«á¥Ñ smart3135 ©ó 2017-2-25 06:45 ½s¿è
·Q½Ð±Ð¤@¤U¦U¦ì«e½ú¡A¥H¤Uªºµ{¦¡½X¦b¼g¦n·í¤Ñ쥻¥i¥H¥¿±`§ì¨ì¿é¤J¤é´Áªº¸ê®Æ
¦bµ{¦¡½X§¹¥þ¨S¦³Åܧ󪺱¡ªp¤U¡A¹j¤Ñ°õ¦æ®É¿é¤J¸ûªº¤é´Á«o¥u¯à§ì¨ì³Ì·s·í¤Ñªº¸ê®Æ
¦³®É¬Æ¦ÜÁ٧줣¨ì¸ê®Æ¡A¤£ª¾¹D¬O§Ú¹q¸£EXCELª©¥»ªº°ÝÃDÁÙ¬Oµ{¦¡½X¦³°ÝÃD¡H¥i¥H½Ð°ª¤âÌÀ°¦£¬Ý¤@¤U¶Ü¡H
«D±`·PÁÂ[attach]26720[/attach]- Option Explicit
- Sub ¤W¥«¥~¸ê©M§ë«H()
- Dim X, Y, qdate, select2 As String
- Sheets("¸ê®Æ°Ï").Select
- X = InputBox("½Ð¿é¤J¤ë¥÷")
- Y = InputBox("½Ð¿é¤J¤é´Á")
- qdate = "106" & "/" & X & "/" & Y
- select2 = "ALLBUT0999"
- With ActiveSheet.QueryTables.Add(Connection:= _
- "URL;http://www.twse.com.tw/ch/trading/fund/T86/T86.php", Destination:=Range( _
- "$A$1"))
- .Name = "ÃÒ¥æ©Ò¤T¤jªk¤H¶R½æ¶W¤é³ø"
- .FieldNames = True
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .PreserveFormatting = False
- .RefreshOnFileOpen = False
- .BackgroundQuery = False
- .RefreshStyle = xlOverwriteCells
- .AdjustColumnWidth = False
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = "2"
- .PostText = "qdate=" & qdate & "&select2=" & select2
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = True
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- End With
- End Sub
- Sub ¤WÂd¥~¸ê¶R½æ¶W()
- '¤WÂd¥~¸ê¶R½æ¶W
- Dim X, Y, mydate As String
- X = InputBox("½Ð¿é¤J¤ë¥÷")
- Y = InputBox("½Ð¿é¤J¤é´Á")
- mydate = "106" & "/" & X & "/" & Y
- Sheets("¸ê®Æ°Ï").Select
- With ActiveSheet
- .Cells.Clear
- With .QueryTables.Add(Connection:= _
- "TEXT;http://www.tpex.org.tw/web/stock/3insti/qfii_trading/forgtr_download.php?l=zh-tw&t=D&type=buy&d=mydate&s=0,asc,1" _
- , Destination:=.Range("$A$1"))
- .TextFileCommaDelimiter = True
- .Refresh BackgroundQuery:=False
- .Delete
- End With
- End With
- End Sub
- Sub ¤WÂd§ë«H¶R½æ¶W()
- '¤WÂd§ë«H¶R½æ¶W
- Dim X, Y, mydate As String
- X = InputBox("½Ð¿é¤J¤ë¥÷")
- Y = InputBox("½Ð¿é¤J¤é´Á")
- mydate = "106" + "/" + "X" + "/" + "Y"
- Sheets("¸ê®Æ°Ï").Select
- Range("a1").Select
- With ActiveSheet
- .Cells.Clear
- With .QueryTables.Add(Connection:= _
- "TEXT;http://www.tpex.org.tw/web/stock/3insti/sitc_trading/sitctr_download.php?l=zh-tw&t=D&type=buy&d=mydate&s=0,asc,1" _
- , Destination:=.Range("$A$1"))
- .TextFileCommaDelimiter = True
- .Refresh BackgroundQuery:=False
- .Delete
- End With
- End With
- End Sub
½Æ»s¥N½X |
-
-
TEST.zip
(19.74 KB)
|