¦³Ãö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
|
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
|
|
|
|
|
|
|
- ©«¤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
|
½Ð¸Õ¥Î¤@¤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
- 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
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
¦^´_ 32# GBKEE
½Ð°Ý¶Wª©¡G
Sub ExB()
With ActiveSheet
With .QueryTables(1)
.Refresh BackgroundQuery:=False
End With
End With
End Sub
¬õ¦r³B¬°¤°»òÁÙn¼g²Ä¤GÓSUB©O¡H
.QueryTables(1)
³o¤S¬O¤°»ò©O¡H¬Oªí¥Ü¦³¤@ÓQueryTables¶Ü¡H
¬°¦ó¤Sn¦A¤@¦¸ .Refresh BackgroundQuery:=False[
ÁÂÁ¶Wª© |
|
|
|
|
|
|
- ©«¤l
- 36
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 76
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-10-1
- ³Ì«áµn¿ý
- 2016-3-21
|
¦^´_ 22# joey0415
·Q½Ð±Ð¤j¤j
¤U¦Cºô§}
http://www.twse.com.tw/ch/trading/block/BFIAUU/BFIAUU.php?combination_choice=sub&cno=1&input_date=102/11/06
¥i¤£¥i¥H¤]¥Îquerytable©O¡H |
|
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
|
¦^´_ 29# c_c_lai
¤F¸Ñ¡AÁÂÁÂ
¤½¦¡§Þ¥©¤]¬O¦bºô¯¸ªF§Û¦è¾ÇÆ[¼¯¦Ó¨Ó¡A
¦pªGn¶i¶¥¶i¯ÅÁÙ¬On°Ñ¥[¶iÁÉÃD¿i½m¸û¯à¾Ç²ß¤@¨Ç°ª§Þ¥©©Ê¤è¦¡¡A
§Úª¾¹DExcelHome¦³ÄvÁÉ°Ï¥i¥H°Ñ¥[¿i½m¡C
¥¿¦b¾Ç²ßVBA¦³ªÅ§Æ±æ§A¦h¦h«ü±Ð |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|