- ©«¤l
- 93
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 111
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- Office 2010 X86
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-7-3
- ³Ì«áµn¿ý
- 2020-12-3
|
·PÁ¤j¤j ¸Ñµª¤F §Ú³o¨â¤Ñªº§xÂZ:D
¤£¤p¤ßª¦¤å§ä¨ì¤U±ªºµ{¦¡½X
¦ý¬O·sªº°ÝÃD¤S¨ÓÅo ¦A¦¸³Â·Ð¤j¤j¤F
°ÝÃD
1. ?myear=" & Myear & "&mmon=" & Mmon ³o¬qµ{¦¡½Xn«ç»ò¨ú±o, ¦bºô¶ªººô§}¨SÅã¥Ü³o¬q
§Ú¦³½Ð±Ð§O¤H PHP POST ¨S¿ìªkª¾¹D ¦ý¬O ³o¬qµ{¦¡½X¬O«ç»ò§Ë¨Óªº,¦n©_?
2. ¶×¤Jªº¸ê®Æ¼È¦s«ç»ò«ü©w¨ìUÄæ,ABÄæ¶}©l §Ú¬Ý¤£¥X¸Ì±¦³»yªk«ü©w³oÓ¦ì¸m?- Sub ¤j½L¾ú¥v¦¨¥æ¸ê°T_³sÄò¤ë_±Æ§Ç()
- Dim Q(1 To 2) As QueryTable, xlData As Date, Myear, Mmon, i As Integer
- With Sheets("¥[Åv¾ú¥v¦æ±¡")
- .Range("E1").CurrentRegion.Offset(1).Clear
- .Range("E1").CurrentRegion.Select
- Application.ScreenUpdating = False
- Set Q(1) = .QueryTables(1)
- Set Q(2) = .QueryTables(2)
- For i = .[b4] - 1 To 0 Step -1
- xlData = DateAdd("m", -i, DateSerial(.[b1] + 1911, .[b2], 1))
- Myear = Year(xlData) - 1911 '¥Á°ê¦~
- Mmon = Format(Month(xlData), "00")
- With Q(1)
- .Connection = "URL;http://www.twse.com.tw/ch/trading/indices/MI_5MINS_HIST/MI_5MINS_HIST.php?myear=" & Myear & "&mmon=" & Mmon ' °ÝÃD1
- .WebTables = "8"
- .Refresh BackgroundQuery:=False
- .ResultRange.Offset(2).Copy .Parent.Cells(Rows.Count, "E").End(xlUp).Offset(1)
- End With
- With Q(2)
- .Connection = "URL;http://www.twse.com.tw/ch/trading/exchange/FMTQIK/genpage/Report" & Year(xlData) & Mmon & "/" & Year(xlData) & Mmon & "_F3_1_2.php?STK_NO=&myear=" & Year(xlData) & "&mmon=" & Mmon
- Q(2).WebTables = "8"
- Q(2).Refresh BackgroundQuery:=False
- .ResultRange.Columns(2).Offset(2).Copy .Parent.Cells(Rows.Count, "J").End(xlUp).Offset(1)
- .ResultRange.Columns(6).Offset(2).Copy .Parent.Cells(Rows.Count, "K").End(xlUp).Offset(1)
- End With
- Next
- .Range("E1").CurrentRegion.EntireColumn.AutoFit
- End With
- Application.ScreenUpdating = True
- MsgBox "¶×¤J§¹¦¨ !!! "
- End Sub
½Æ»s¥N½X
¥[Åv¾ú¥v¦æ±¡.rar (15.27 KB)
|
|