¦³ÃöEXCEL VBA §ì¨ú¤£¨ì§¹¾ãºô§}CSV°ÝÃD
- ©«¤l
- 11
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 14
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2011-9-17
- ³Ì«áµn¿ý
- 2017-4-24
|
gbkee,c_c_lai±z¦n¡G
§Ú¤]¦³¤Wzªº°ÝÃD¡A¤]¬OÃÒ¥æ©Òºô¯¸°ÝÃD¡A¦ý¸Õ¤F«Ü¤[³£¨S¦³µ²ªG¡A¥i¥H½Ð±Ð°ª¤â¬Oþ¸Ì¥X¿ù¤F¶Ü? ÁÂÁ±z
http://www.twse.com.tw/ch/trading/exchange/TWT93U/TWT93U.php#- Sub TEST123()
- 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"))
- With Sheets("¤U¸ü¸ê®Æ")
- For Each N In .Names
- 'N.Delete
- Next
- .Cells.Clear
- GetData_URL = "URL;http://www.twse.com.tw/ch/trading/exchange/TWT93U/TWT93U.php?edition=ch&filename=genpage/A" & YMD_day & ".dat&type=csv"
- 'webURL = "URL; http://www.twse.com.tw/ch/trading/block/BFIAUU/BFIAUU.php?input_date=" & YMD_day & "&login_btn=¬d¸ß.dat"
- With .QueryTables.Add(Connection:=GetData_URL, Destination:=.Range("A1"))
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = "data_table"
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = False
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = True
- .Refresh BackgroundQuery:=False
- End With
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 11
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 14
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2011-9-17
- ³Ì«áµn¿ý
- 2017-4-24
|
¦³ÃöEXCEL VBA §ì¨ú¤£¨ì§¹¾ãºô§}CSV°ÝÃD
¦U¦ì°ª¤â±z¦n¡A
¦]n§ì¥ý«e¤wª¦¤å¡Ahttp://forum.twbts.com/viewthread.php?tid=10770¡Aקï¹L«á¡A¸ê¤´±a¤£¥X¨Ó¡A½Ð·Q°Ý¦U¦ì°ª¤â¬O§_php«á±ªº»yªk¨Ï¥Î¦³»~¡AÁÂÁ¤j®a^^
http://www.twse.com.tw/ch/trading/exchange/TWT93U/TWT93U.php- Option Explicit
- Sub ExA()
- With ActiveSheet
- With .QueryTables.Add("URL;http://www.twse.com.tw/ch/trading/exchange/TWT93U/TWT93U.php#?combination_choice=sub&cno=1&input_date=103/02/25", .[A1])
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = """data_table"""
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- End With
- End With
- End Sub
½Æ»s¥N½X- Sub TEST123()
- 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"))
- With Sheets("¤U¸ü¸ê®Æ")
- For Each N In .Names
- 'N.Delete
- Next
- .Cells.Clear
- GetData_URL = "URL;http://www.twse.com.tw/ch/trading/exchange/TWT93U/TWT93U.php?edition=ch&filename=genpage/A" & YMD_day & ".dat&type=csv"
- 'webURL = "URL; http://www.twse.com.tw/ch/trading/block/BFIAUU/BFIAUU.php?input_date=" & YMD_day & "&login_btn=¬d¸ß.dat"
- With .QueryTables.Add(Connection:=GetData_URL, Destination:=.Range("A1"))
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = "data_table"
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = False
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = True
- .Refresh BackgroundQuery:=False
- End With
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 11
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 14
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2011-9-17
- ³Ì«áµn¿ý
- 2017-4-24
|
|
|
|
|
|
|
- ©«¤l
- 11
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 14
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2011-9-17
- ³Ì«áµn¿ý
- 2017-4-24
|
heavenweaver ±z¦n
§Ú¥Ø«e¦³¤GÓºô§}
http://www.gretai.org.tw/ch/stock/statistics/monthly/st42.php
http://www.gretai.org.tw/ch/stock/statistics/monthly/st44.php
³£¬OÄÝ©ó¤Wzªºª¬ªp¡A§Ú·Q½Ð±Ð¤@¤U¡A¬O§_¦³¤u¨ã¥i¥H¬d¸ß?edition=ch&filename=genpage/A" & YMD_day & ".dat&type=csv" --ªº°Ñ¼Æ¸ê®Æ¥X¨Ó©O¡AÁÂÁ |
|
|
|
|
|
|
- ©«¤l
- 11
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 14
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2011-9-17
- ³Ì«áµn¿ý
- 2017-4-24
|
ÁÂÁÂheavenweaver¡A¤S¾Ç¨ì¤@©Û¤F |
|
|
|
|
|
|