[µo°Ý]VBA§ì¨ú.PHP¶°ÝÃ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
|
¦U¦ì°ª¤â±z¦n
http://www.gretai.org.tw/ch/stock/statistics/monthly/st44.php
»P¤Wzºô¯¸¬ÛÃþ¡A¦ý¥¦¿é¤J®É¦³¤GӰѼơA¥Ø«e§ä¨ìªº°Ñ¼Æ¬O"yy"¡A·Q½Ð±Ð¤@¤U¦pªG¬O¦³stk_no»Pyy¡A¤U±sendªºµ{¦¡¸Ó¦p¦óקï©O? ÁÂÁÂ
.Send ("stk_no=" & code) |
|
|
|
|
|
|
- ©«¤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¡A
§Ú¤w¦³½Æ»s#12ªºSub WrittenByLalalada()¨Óקï
http://www.gretai.org.tw/ch/stock/statstics/monthly/download_st44.php
¤W¦Cºô§}¦³¤GӰѼơA¤w±Nµ{¦¡§ï¼g¦p¤U¡A¦ý¦~«×ªºsend±ø¥óÁÙ¬O§ì¨ú¤£¨ì(µ{¦¡½X¦p¤U)¡AÁÂÁ±z- Private Sub CommandButton1_Click()
- '«Å§iÅܼÆ
- Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
- Dim TMP As Workbook
- '²M°£Â¸ê®Æ
- Range("A4:Z2000").Select
- Selection.Clear
- code = Range("A1").Value 'ªÑ²¼¥N½X
- yy = Range("B1").Value '¦~«×
- '±N¸ê®Æ¥ý¦s¦ÜcÁV
- With WinHttpReq
- '.Open "POST", "http://www.gretai.org.tw/ch/stock/statistics/monthly/download_st44.php", False
- .Open "POST", Range("C1").Value, False
- .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- .Send ("stk_no=" & code & "yy=" & yy)
- Set oStream = CreateObject("ADODB.Stream")
- oStream.Open
- oStream.Type = 1
- oStream.Write WinHttpReq.ResponseBody
- oStream.SaveToFile ("C:\" & code & ".csv")
- oStream.Close
- 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
|
heavenweaver±z¦n¡A
·Q¦V±z½Ð±Ð¡A¥ý«eª©¥»¨Ì·Ó±zªº«ü¾É¤w¥i¥¿±`¨Ï¥Î¡A¦ý¤µ¤é¾Þ§@®É¡Aµo²{excel¸ê®Æ¸ü¤£¤U¨Ó¡A¬O§_¬ÛÃö°Ñ¼Ænקï©O? ÁÂÁ±z¡C- Private Sub CommandButton4_Click()
- '«Å§iÅܼÆ
- Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
- Dim TMP As Workbook
- '²M°£Â¸ê®Æ
- Range("F66:Z200").Select
- Selection.Clear
- code = Range("A1").Value 'ªÑ²¼¥N½X
- yy = Range("H4").Value '¦~«×
- '±N¸ê®Æ¥ý¦s¦ÜcÁV
- With WinHttpReq
- .Open "POST", "http://www.gretai.org.tw/ch/stock/statistics/monthly/download_st44.php", False
- .Open "POST", Range("I4").Value, False
- .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- .Send "stk_no=" & code & "&yy=" & yy '¶ÇªÑ²¼¥N½X¡B¦~«×°Ñ¼Æ
- Set oStream = CreateObject("ADODB.Stream")
- oStream.Open
- oStream.Type = 1
- oStream.Write WinHttpReq.ResponseBody
- oStream.SaveToFile ("C:\" & code & "-M.csv")
- oStream.Close
- 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
|
heavenweaver±z¦n¡A
¨Ï¥ÎFiddler¤u¨ãµo²{ºô§}¦³²§°Ê¡A¤w§ä¨ì°ÝÃD¤F¡AÁÂÁ±z |
|
|
|
|
|
|