¦³ÃöEXCEL VBA §ì¨ú¤£¨ì§¹¾ãºô§}CSV°ÝÃD
- ©«¤l
- 48
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 60
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-8-13
- ³Ì«áµn¿ý
- 2023-2-7
|
½Ð¸Õ¥Î¤@¤U§a
Sub TWT93U()
'
'
' «H¥ÎÃB«×Á`¶qºÞ¨î¾lÃBªí @ TWSE »OÆWÃÒ¨é¥æ©ö©Ò ¡á¥æ©ö¸ê°T ¡á¿Ä¸ê¿Ä¨é»P¥iɨé½æ¥XÃB«× ¡á¿Ä¨éɨé½æ¥X¾lÃB
' http://www.twse.com.tw/ch/trading/exchange/TWT93U/TWT93U.php
Dim YMD_day As String, N As Name, webURL As String
YMD_day = Format(Date, "E/MM/DD")
With Sheets("Sheet1")
For Each N In .Names
N.Delete
Next
.Cells.Clear
webURL = "URL;http://www.twse.com.tw/ch/trading/exchange/TWT93U/TWT93U.php?input_date=" & YMD_day & "&login_btn=¬d¸ß.dat"
With .QueryTables.Add(Connection:=webURL, Destination:=.Range("A1"))
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "7,9"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = False
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
End With
End Sub |
|
«Ü©êºp¡A§Ú¬O¤p¾Ç¥Í¡A¤£¯à¤U¸üÀɮסA¬OÓ¤p§¾«Ä¡I
|
|
|
|
|
- ©«¤l
- 48
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 60
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-8-13
- ³Ì«áµn¿ý
- 2023-2-7
|
¦^´_ 35# gto1208
§ï¦n¤F¡A½Ð¸Õ¥Î§a¡I
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 = "9"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = False
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
End With
End With
End Sub |
|
«Ü©êºp¡A§Ú¬O¤p¾Ç¥Í¡A¤£¯à¤U¸üÀɮסA¬OÓ¤p§¾«Ä¡I
|
|
|
|
|
- ©«¤l
- 48
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 60
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-8-13
- ³Ì«áµn¿ý
- 2023-2-7
|
|
«Ü©êºp¡A§Ú¬O¤p¾Ç¥Í¡A¤£¯à¤U¸üÀɮסA¬OÓ¤p§¾«Ä¡I
|
|
|
|
|