- ©«¤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°Ý] ¦p¦ó¥ÎVBA¤U¸üÃÒ¥æ©Ò¨C¤éªº¤T¤jªk¤H¶R½æ°O¿ý
¥»©«³Ì«á¥Ñ smart3135 ©ó 2017-2-19 17:42 ½s¿è
½Ð±Ð¦U¦ì«e½ú¡A§Ú·Q¥ÎVBA¤U¸üÃÒ¥æ©Ò¨C¤éªº¤T¤jªk¤H¶R½æ°O¿ý¡A¦ý¥Ø«e¥u¦³ÈФT¤jªk¤H¶R½æ¶W¤é³øÈЪºµ{¦¡½X
¦ý§Ú·Qn¤U¸üªº¬OÈÐ¥~¸ê¤Î³°¸ê¶R½æ¶W·JÁ`ªíÈЩMÈЧë«H¶R½æ¶W·JÁ`ªíÈгo¨âÓ³øªí¡A¦³¬Ý¹Lì©l½X
ÅܼƦ³¨Ç¤£¦P¡A¤£ª¾¹D¸Ó«ç»ò¼g¡A¥i¥H½Ð«e½úÌ«üÂI¤@¤U¶Ü¡HÁÂÁÂ
¤T¤jªk¤H¶R½æ¶W¤é³øµ{¦¡½X- Option Explicit
- Sub ÃÒ¥æ©Ò¤T¤jªk¤H¶R½æ¶W¤é³ø()
- Dim qdate As String, select2 As String
- qdate = "105/06/07"
- 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
½Æ»s¥N½X http://www.twse.com.tw/ch/trading/fund/T86/T86.php¡@¡@¤T¤jªk¤H¶R½æ¶W¤é³ø
http://www.twse.com.tw/ch/trading/fund/TWT38U/TWT38U.php¡@¡@¥~¸ê¤Î³°¸ê¶R½æ¶W·JÁ`ªí
http://www.twse.com.tw/ch/trading/fund/TWT44U/TWT44U.php¡@¡@§ë«H¶R½æ¶W·JÁ`ªí |
|