ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¥æ©ö©ú²Ó¤U¸ü

¦^´_ 26# tsuneng
Åý§A¥¢±æ¤F, ¸Õ¤F¤@¤Ñ ¤´¬O¥¢±Ñ ¹ïºô­¶»y¨¥¤£¼ô µLªk¤U¸ü ³oºô§}©Ò¦³ªº¸ê®Æ
http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/brokerBS.php?  À|¸Õ¥Î IE ¤U¸üTables ªº¤º®e ¦ýÁÙ¬O¥¢±Ñ
¦phttp://forum.twbts.com/viewthread.php?tid=7395&page=1&extra=#pid42189 ªº5# ªþÀÉ
³ohttp://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php?'¥i¤U¸ü¥þ³¡CSV: ¦ý¹ïºô­¶¬[ºc¤£¼ô,¼g¤£¥X¥¦ªº°Ñ¼Æ
±æª¾±xªÌ¬Û§U
¥Î EXCEL  WEBªº¬d¸ß¤]¦³©Ò­­¨î,¥u¥i¬d¬Ý²Ä¤@­¶ªº¸ê®Æ,
  1. Option Explicit
  2. Sub Ex()
  3.     With ActiveSheet.QueryTables.Add("URL;http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/brokerBS.php?stk_code=6121", ActiveSheet.[A1])
  4.         .WebSelectionType = xlSpecifiedTables
  5.         .WebFormatting = xlWebFormattingNone
  6.         .WebTables = "11,13,14"
  7.         .Refresh BackgroundQuery:=False
  8.     End With
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 31# GBKEE
ÁÂÁÂGBKEE ¤j¤j ¼ö¤ß¤À¨É¡A·P®¦!!

TOP

¦^´_ 31# GBKEE


    Âd¶R¤¤¤ßªº³o­ÓSERVERºÝµ{¦¡¥u±µ¦¬ POST¶Ç»¼ (GET¶Ç»¼µL®Ä) ªº¸ê®Æ¡A¶·±Ä¥Î XMLHTTP ¥H POST ¶Ç»¼ thePOSTdata¡A¨ú±o response «áª½±µ¦s¦¨ csv §Y¥i
  1.    thePOSTdata = "curstk=" & ªÑ²¼¥N½X & "&fromw=0&numbern=100&stk_date=" & ¸ê®Æ¤é´Á    '¤é´Á®æ¦¡ 1010730
  2.    thePOSTActionFile = "http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php"

  3.    Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
  4.    oXMLHTTP.Open "POST", thePOSTActionFile, False
  5.    oXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  6.    
  7.    'send request - POST
  8.     oXMLHTTP.send thePOSTdata
  9. ....
½Æ»s¥N½X
diabo

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-8-11 06:54 ½s¿è

¦^´_ 33# diabo
·PÁ¬ۧU ¦¨¥\!
  1. Option Explicit
  2. Private Sub ¤U¸ühtm()
  3.     Dim xml As Object     '¥Î¨Ó¨ú±oºô­¶¸ê®Æ
  4.     Dim stream            'As ADODB.stream   '¥Î¨ÓÀx¦s¤G¶i¦ìÀÉ®×
  5.     Dim URL As String     '¥Øªººô§}
  6.     Dim thePOSTdata       '°Ñ¼Æ
  7.     Set xml = CreateObject("Microsoft.XMLHTTP")
  8.     Set stream = CreateObject("ADODB.stream")
  9.     URL = "http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php"
  10.     thePOSTdata = "curstk=3527&stk_date=1010810"
  11.         xml.Open "POST", URL, 0
  12.         xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  13.         xml.send thePOSTdata
  14.     With stream
  15.         .Open
  16.         .Type = 1
  17.         .write xml.ResponseBody
  18.         If Dir("D:\3527.CSV") <> "" Then Kill "D:\3527.CSV"
  19.         .SaveToFile ("D:\3527.CSV")                              
  20.         .Close
  21.     End With
  22. Set xml = Nothing
  23. Set stream = Nothing
  24. End Sub
½Æ»s¥N½X

TOP

¦^´_ 34# GBKEE

¸Õ¤F,¦¨¥\!!  GBKEE ªGµM¬O°ª¤H,ÁÂÁ¼ö¤ß¬Û§U!!!

TOP

¦n¼F®`¡I¼F®`......
¦¨¥\¤F
µ¥«Ýª©¥D¤À¨É§¹¾ã¤U¸ü¤WÂd¸ê®Æ¤º½X
·P®¦

TOP

        ÀR«ä¦Û¦b : §ïÅܦۤv¬O¦Û±Ï¡A¼vÅT§O¤H¬O±Ï¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD