- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 3# t8899 - Option Explicit
- Sub TWSE_¥æ©ö¸ê°T()
- Dim YMD_day As String, N As Name, webURL As String
- YMD_day = InputBox("¿é¤J ¥Á°ê¦~«× : 102/10/07", "¤U¸ü¯S©w¤é´Áªº¸ê®Æ", Format(Date - 1, "E/MM/DD")) '¥Á°ê¦~«× "102/10/07"
- With ActiveSheet '¥i«ü©w¤u§@ªí
- '·í¤é¨R¾P¥æ©ö¼Ðªº¤Î²Îp
- webURL = "URL;http://www.twse.com.tw/ch/trading/exchange/TWTB4U/TWTB4U.php?input_date=" & YMD_day & "&login_btn=¬d¸ß.dat"
- '¹dÃB¥æ©ö¤é¦¨¥æ¸ê°T
- 'webURL = "URL; http://www.twse.com.tw/ch/trading/block/BFIAUU/BFIAUU.php?input_date=" & YMD_day & "&login_btn=¬d¸ß.dat"
- 'webURL = "URL; http://www.twse.com.tw/ch/trading/block/BFIAUU/BFIAUU.php?input_date=" & YMD_day & "&login_btn=%ACd%B8%DF.dat"
- If .QueryTables.Count = 0 Then
- .QueryTables.Add Connection:=webURL, Destination:=.Range("A1")
- Else
- .QueryTables(1).Connection = webURL
- End If
- .Cells.Clear
- With .QueryTables(1)
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- ' .WebTables = "data_table" '¹dÃB¥æ©ö¤é¦¨¥æ¸ê°T :¸ê®Æ¶×¤JªºTables
- .WebTables = "9,11" '·í¤é¨R¾P¥æ©ö¼Ðªº¤Î²Îp :¸ê®Æ¶×¤JªºTables
- .Refresh BackgroundQuery:=False
- End With
- End With
- End Sub
½Æ»s¥N½X |
|