´Á³f¥æ©ö©Ò¹dÃBªÑ²¼´Á³f¸ê®Æ¾e¨ú
- ©«¤l
- 29
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOW XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TAIPEI
- µù¥U®É¶¡
- 2010-5-4
- ³Ì«áµn¿ý
- 2021-11-24
|
´Á³f¥æ©ö©Ò¹dÃBªÑ²¼´Á³f¸ê®Æ¾e¨ú
´Á³f¥æ©ö©Òºô¯¸
http://www.taifex.com.tw/chinese/3/3_3_3.asp
«´¬ù:ªÑ²¼´Á³f
¥u¯à¬Ý
EXCEL¬d¸ß¤S¦^¨ì
«´¬ù:¥x«ü´Á³f(TX)
¦³¿ìªk EXCEL VBA ¾e¨ú «´¬ù:ªÑ²¼´Á³f ¶Ü??????!!!!!
½Ð±Ð°ª¤âÌ....... |
|
|
|
|
|
|
- ©«¤l
- 15
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 27
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- 2010
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2013-12-23
- ³Ì«áµn¿ý
- 2015-8-10
|
¦^´_ 2# GBKEE
¤£¦n·N«ä¦APO¤@¦¸- Option Explicit
- Sub Ex_¥x´Á_¦U°Ó«~¦¨¥æ¸ê°T()
- Dim E As Object, i As Integer, ii As Integer, K As Integer
- Dim xadte As Date
- xadte = DateAdd("yyyy", -1, Date) '¤é´Á(°_)¡G
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate "http://www.taifex.com.tw/chinese/3/7_12_6.asp"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
-
- '<OPTION value="TX" selected>¥xªÑ´Á³f(TX)</OPTION>
- '<OPTION value="MTX" >¤p«¬¥x«ü(MTX)</OPTION>
- '<OPTION value="TXO" >¥x«ü¿ï¾ÜÅv(TXO)</OPTION>
- '<OPTION value="STF" >ªÑ²¼´Á³f</OPTION>
- '.document.ALL("commodity_idt").Value = "STF" '«´¬ù: ªÑ²¼´Á³f
-
- With .document.getElementsByTAGName("INPUT")
- .Item("datestart").Value = Format(xadte, "YYYY/MM/DD")
- .Item("dateend").Value = Format(Date, "YYYY/MM/DD")
- .Item("button4").Click
- End With
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
- Set E = .document.getElementsByTAGName("TABLE")(3)
- ActiveSheet.UsedRange.Clear
- For i = 0 To E.Rows.Length - 1
- K = K + 1
- For ii = 0 To E.Rows(i).Cells.Length - 1
- Cells(K, ii + 1) = E.Rows(i).Cells(ii).INNERTEXT
- Next
- Next
- .Quit 'Ãö³¬ºô¶
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤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# leoncc
³oºô¶¬On¤U¸üÀÉ®×- Option Explicit
- Sub Ex_¥x´Á_¦U°Ó«~¦¨¥æ¸ê°T()
- Dim xDate(1 To 2) As Date, xPath As String, wB As String
- 'IE ¤U¸üÀɮתº¸ê®Æ§¨
- xPath = "C:\Documents and Settings\hsu\My Documents\"
- '²MªÅ ¤U¸üÀɮתº¸ê®Æ§¨ ªºcsvÀÉ
- If Dir(xPath & "*.csv") <> "" Then Kill xPath & "*.csv"
-
- xDate(1) = DateAdd("yyyy", -1, Date) '¤é´Á(°_)¡G
- xDate(2) = Date '¤é´Á(¨´)¡G
- If Weekday(Date, vbMonday) >= 6 Then '·í¤é«DÀç·~¤é
- Do While Weekday(Date, vbMonday) >= 6
- xDate(2) = xDate(2) - 1
- Loop
- ElseIf Time < #3:00:00 PM# Then
- xDate(2) = xDate(2) - 1 '·í¤é¤j½L¸ê®Æ©|¥¼¾ã²z§¹²¦
- End If
-
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate "http://www.taifex.com.tw/chinese/3/7_12_6.asp"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
-
- '<OPTION value="TX" selected>¥xªÑ´Á³f(TX)</OPTION>
- '<OPTION value="MTX" >¤p«¬¥x«ü(MTX)</OPTION>
- '<OPTION value="TXO" >¥x«ü¿ï¾ÜÅv(TXO)</OPTION>
- '<OPTION value="STF" >ªÑ²¼´Á³f</OPTION>
- '.document.ALL("commodity_idt").Value = "STF" '«´¬ù: ªÑ²¼´Á³f
-
- With .document.getElementsByTAGName("INPUT")
- .Item("datestart").Value = Format(xDate(1), "YYYY/MM/DD")
- .Item("dateend").Value = Format(xDate(2), "YYYY/MM/DD")
- .Item("button4").Click
- End With
- Application.Wait Now + #12:00:02 AM#
- Application.SendKeys "%s", True
- Application.Wait Now + #12:00:01 AM# '¦pVBA°õ¦æ³t«×§Ö,¥i©µªø¬í¼Æ
- Application.SendKeys "%s", True
- .Quit 'Ãö³¬ºô¶
- End With
- wB = Dir(xPath & "*.csv")
- If wB <> "" Then Workbooks.Open (xPath & wB) '¶}±Ò¤U¸üªºÀÉ®×
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 15
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 27
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- 2010
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2013-12-23
- ³Ì«áµn¿ý
- 2015-8-10
|
¦^´_ 4# GBKEE
ÁÂÁÂG¤j¦^ÂСA¦ý¥i¯àn¦A³Â·ÐG¤j¤F¡A¤p§Ì°õ¦æ«á¡AµL¥ô¦ó¿ù»~¡B¦ý¤]µL¥ô¦ó¸ê®Æ¡AÀɮפ´¬OªÅ¥Õ¡C ¤p§Ì¸Õ¹L§ó§ï¦sÀɸô®|¡A¦ý¤´¬OªÅ¥Õ¡C¤£³Ó·P¿E |
|
|
|
|
|
|
- ©«¤l
- 15
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 27
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- 2010
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2013-12-23
- ³Ì«áµn¿ý
- 2015-8-10
|
¦^´_ 6# GBKEE
G¤j±z¦n
¦¤W10:40´ú¸Õ¤F¤@¤U¡AÁÙ¬O¥X²{¤U¦C¿ù»~:
°£¤Wz¿ù»~¥~¡AÀɮרõL¥ô¦ó°Ê§@¡A¤]¨S¦³G¤j©Òz¤U¸üÀɮתºµøµ¡¡C
¥t¥~¸òG¤j³ø§i¡A§Úªº¬OIE11¡An¦A³Â·ÐG¤j¤F ¤£¦n·N«ä
ì©l½X:- Option Explicit
- Sub Ex_¥x´Á_¦U°Ó«~¦¨¥æ¸ê°T()
- Dim xDate(1 To 2) As Date, xPath As String, wB As String
- 'IE ¤U¸üÀɮתº¸ê®Æ§¨
- ' xPath = "C:\Documents and Settings\hsu\My Documents\"
- '²MªÅ ¤U¸üÀɮתº¸ê®Æ§¨ ªºcsvÀÉ
- 'If Dir(xPath & "*.csv") <> "" Then Kill xPath & "*.csv"
-
- xDate(1) = DateAdd("yyyy", -1, Date) '¤é´Á(°_)¡G
- xDate(2) = Date '¤é´Á(¨´)¡G
- If Weekday(Date, vbMonday) >= 6 Then '·í¤é«DÀç·~¤é
- Do While Weekday(Date, vbMonday) >= 6
- xDate(2) = xDate(2) - 1
- Loop
- ElseIf Time < #3:00:00 PM# Then
- xDate(2) = xDate(2) - 1 '·í¤é¤j½L¸ê®Æ©|¥¼¾ã²z§¹²¦
- End If
-
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate "http://www.taifex.com.tw/chinese/3/7_12_6.asp"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
-
- '<OPTION value="TX" selected>¥xªÑ´Á³f(TX)</OPTION>
- '<OPTION value="MTX" >¤p«¬¥x«ü(MTX)</OPTION>
- '<OPTION value="TXO" >¥x«ü¿ï¾ÜÅv(TXO)</OPTION>
- '<OPTION value="STF" >ªÑ²¼´Á³f</OPTION>
- '.document.ALL("commodity_idt").Value = "STF" '«´¬ù: ªÑ²¼´Á³f
-
- With .document.getElementsByTAGName("INPUT")
- .Item("datestart").Value = Format(xDate(1), "YYYY/MM/DD")
- .Item("dateend").Value = Format(xDate(2), "YYYY/MM/DD")
- .Item("button4").Click
- End With
- Application.Wait Now + #12:00:02 AM#
- Application.SendKeys "%s", True 'Àx¦s
- Application.Wait Now + #12:00:02 AM# '¦pVBA°õ¦æ³t«×§Ö,¥i©µªø¬í¼Æ
- Application.SendKeys "%s", True '¥t¦s·sÀÉ
- Application.Wait Now + #12:00:02 AM#
- Application.SendKeys "%O", True ' ***¶}±ÒÀÉ®×***
- .Quit 'Ãö³¬ºô¶
- End With
- ' wB = Dir(xPath & "*.csv")
- 'If wB <> "" Then Workbooks.Open (xPath & wB) '¶}±Ò¤U¸üªºÀÉ®×
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-6-1 14:10 ½s¿è
¦^´_ 7# leoncc
¦A¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex_¥x´Á_¦U°Ó«~¦¨¥æ¸ê°T()
- Dim xDate(1 To 2) As Date, xPath As String, wB As String
- xDate(1) = DateAdd("yyyy", -1, Date) '¤é´Á(°_)¡G
- xDate(2) = Date '¤é´Á(¨´)¡G
- If Time < #3:00:00 PM# Then 'Àç®É¶¡·~µ²§ô¤§«e«Ý¤j½L¸ê®Æ¾ã²z§¹²¦
- Do While Weekday(xDate(2), vbMonday) >= 6 Or Weekday(xDate(2), vbMonday) = 1
- '±Æ°£ ¶g¤»,¶g¤é,¶g¤@
- xDate(2) = xDate(2) - 1 '¦V«e´î¤@¤é
- Loop
- ElseIf Time < #3:00:00 PM# Then ''·í¤é¤j½L¸ê®Æ¾ã²z§¹²¦
- Do While Weekday(xDate(2), vbMonday) >= 6 '±Æ°£ ¶g¤»,¶g¤é
- xDate(2) = xDate(2) - 1 '¦V«e´î¤@¤é
- Loop
- End If
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate "http://www.taifex.com.tw/chinese/3/7_12_6.asp"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
-
- '<OPTION value="TX" selected>¥xªÑ´Á³f(TX)</OPTION>
- '<OPTION value="MTX" >¤p«¬¥x«ü(MTX)</OPTION>
- '<OPTION value="TXO" >¥x«ü¿ï¾ÜÅv(TXO)</OPTION>
- '<OPTION value="STF" >ªÑ²¼´Á³f</OPTION>
- '.document.ALL("commodity_idt").Value = "STF" '«´¬ù: ªÑ²¼´Á³f
-
- With .Document.getElementsByTAGName("INPUT")
- .Item("datestart").Value = Format(xDate(1), "YYYY/MM/DD")
- .Item("dateend").Value = Format(xDate(2), "YYYY/MM/DD")
- .Item("button4").Click
- End With
- Application.Wait Now + #12:00:02 AM#
- Application.SendKeys "%s", True 'Àx¦s
- Application.Wait Now + #12:00:02 AM# '¦pVBA°õ¦æ³t«×§Ö,¥i©µªø¬í¼Æ
- Application.SendKeys "%s", True '¥t¦s·sÀÉ
- Application.Wait Now + #12:00:02 AM#
- Application.SendKeys "%O", True ' ***¶}±ÒÀÉ®×***
- .Quit 'Ãö³¬ºô¶
- End With
-
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|