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

[µo°Ý] ÃÒ¥æ©Ò¸ê®Æ¦Û°Ê¤U¸ü

[µo°Ý] ÃÒ¥æ©Ò¸ê®Æ¦Û°Ê¤U¸ü

¥»©«³Ì«á¥Ñ lalalada ©ó 2012-7-27 15:58 ½s¿è

ÃÒ¥æ©Òºô¯¸³ºµM§ïª©¤F£½£¿ ¤~­è¼g¦nªº»¡
§¹¥þ¨S¦³·s¤âªº¦n¹B....
    ActiveSheet.name = sheetname
    webURL = "URL; http://bsr.twse.com.tw/bshtm/bsContent.aspx? StartNumber=2498&FocusIndex=All_21"
    'webURL = "URL; http://bsr.twse.com.tw/bshtm/bshtm_report_Messages.aspx? StartNumber=2498&FocusIndex=All_100"   ¦ì§}·|´«!
    With ActiveSheet.QueryTables.Add(Connection:=webURL, Destination:=Range("A1"))
        .PreserveFormatting = True
        .RefreshStyle = xlInsertDeleteCells
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingNone
    End With
¤¤¶¡¦³¦æµù¸Ñ´N¬O²Ä¤@¦¸§ïª©ªº¨£ÃÒ....''(§ïºô§})
¦Ó³o¦¸§ïª©«á ¥»¨Ó¨Ï¥Î http://bsr.twse.com.tw/bshtm/bsC ... ;FocusIndex=All_100
´N¥i¥H¾A¥Î¨C¤äªÑ²¼ ¥u­n§ï¥N½X´N¦n
¦ý¬O²{¦b­n«ü©w­¶¼Æ
¤ñ¦p3008ªº¸ê®Æ¦@20­¶  http://bsr.twse.com.tw/bshtm/bsC ... p;FocusIndex=All_20
«hALL«á­±¿é¤J1~20³£§ì±o¨ì ¶W¹L20«hµLªkŪ¨ú
¤£ª¾¹D¯à¤£¯à§ä¥Xºô¯¸¨M©w­¶¼Æªº¤èªk©O?
¤S §Ú¦bºô¯¸­ì©l½X view-source:http://bsr.twse.com.tw/bshtm/bsMenu.aspx  ¤¤µo²{
//    window.open("bshtm/"+ HiddenField_spDate +"/"+ document.getElementById("hidTASKNO").value+"/"+ document.getElementById("hidTASKNO").value+".csv");
window.open("bsContent.aspx?StartNumber=" + document.getElementById("hidTASKNO").value + "&download=csv");
ªí¥Ü¦³csvÀɧ@¬°ºô­¶¸ê®Æ·½?¦³¨S¦³¿ìªk§ì¨ì©O?
·Pı·|¬O¤ñ¸û¤@³Ò¥Ã¶hªº°µªk ¥B¤U¸ücsv·|¤ñ¬d¸ß§Ö«Ü¦h
·P¿E¤£ºÉ!

°ÝÃD¤w¸Ñ¨M! ¶¶«K­×¤F¤@¤U­ì¥»¶Kªºµ{¦¡½X §â¤Ó¶ÃµLÃöªº³¡¤À§R±¼¤è«K¤j®a¬Ý@@

TOP

¥»©«³Ì«á¥Ñ lalalada ©ó 2012-7-27 15:50 ½s¿è
¦^´_  lalalada
½Ð¬Ý³o¸Ì
GBKEE µoªí©ó 2012-7-26 17:54


¦^´_ 2# GBKEE
ÁÂÁ§A!!:)
§Ú¤U¤È¤]µo²{¤F³o­Ó³sµ² µM«á¥Î¤Fopen¤èªk  
URL = "http://bsr.twse.com.tw/bshtm/bsContent.aspx?StartNumber=1101&download=csv"
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
    With WinHttpReq
    .Open "OPEN", URL, False
    .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    .Send
           Set oStream = CreateObject("ADODB.Stream")
           oStream.Open
           oStream.Type = 1
           oStream.Write WinHttpReq.ResponseBody
           oStream.SaveToFile ("C:\TEST\" + bookname + "\" + code + ".csv")
           oStream.Close
    End With
¥i¬Oµo²{¤@­Ó­P©Rªº°ÝÃD
±q¨º­Ó¦ì§}¤U¸ü¤U¨ÓªºcsvÀɸê®Æ¦³¿òº|
¥]¬A¦ì¸m¨S¹ï»ô¡B¥¢¥h§@¥b³¡ªº½æ¥X¸ê®Æ©M¥k¥b³¡ªº¶i¥X¸ê®Æ
©Ò¥H¤~·Q¥Î¬d¸ßªí ÁöµMºC¥i¬OÀ³¸Ó¤£·|¿ù(·|¸òºô­¶¤W¬Ý¨ì¤@¼Ë)
¥Ø«eªº·Qªk¬O:
1. ¯à¸Ñ¨McsvÀɮ׿ù»~¬O³Ì¦nªº¡A¤S§Ö¤S¤è«K¡A¥i¬O·Pı¨M©wÅv¦bÃÒ¥æ©Ò...(°½°½°Ý¤@¤U¦³¥i¯à¬O¥L­Ì°Ê¤â¸}¶Ü@@?)
2. §Q¥Îvba¨ú±oºô­¶­ì©l½X¡AµM«á·j´M­¶½Xªº¥N½X
¦A¦¸·PÁª©¥Dªº¼ö¤ßÀ°§U!!:D

TOP

ÁÂÁ§A!!
§Ú¤U¤È¤]µo²{¤F³o­Ó³sµ² µM«á¥Î¤Fopen¤èªk  
URL = "http://bsr.twse.com.tw/bshtm/bsCon ...
lalalada µoªí©ó 2012-7-26 19:39


CSV ªº¸ê®Æ, ½T¹ê¦pª©¤j©Ò¨¥¤£§¹¾ã ...
manny

TOP

¥»©«³Ì«á¥Ñ white5168 ©ó 2012-7-26 21:53 ½s¿è

§ï¥Î¼É¤Oªk§ìÀÉ®×,¤£µM¨C¤äªÑ²¼³£­n³o¼Ë§ì¯uªº«Ü²Ö,­þ¤Ñ®æ¦¡¤S§ï¤F´N¯uªº±ý­úµL²\

¯à§_«Øijª©¥D¶}¥H­Ópythonª©,Åý¤@¨Ç¤H¥i¥H¤À¨Épython§ì¸ê®Æªº¤èªk

TOP

¥»©«³Ì«á¥Ñ conchih ©ó 2012-7-28 12:47 ½s¿è

¤p§Ì¤]¹J¨ì³o­Ó°ÝÃD¤F
½Ð±Ð¦³¨S¦³¤j¤j¥i¥H

¥i¥H±qºô­¶¤¤§ä¨ìsp_listcountªº­È
µM«á´N¥i¥H¦A¥Î¤U­±³o­Ó¨Ó§ì¸ê®Æ


¦Ü©ó.csv§Ú·Q¸ê®Æ¤£¥¿½T,µ¥¨ì¥¿½T¦A¨Ó§ì§a

phthon¦n¹³«Ü¦n,©ú¤Ñ¦A¨Ó¬ã¨s¬ã¨sÅo
·PÁ¦U¦ì¤j¤j

TOP

§ï¥Î¼É¤Oªk§ìÀÉ®×,¤£µM¨C¤äªÑ²¼³£­n³o¼Ë§ì¯uªº«Ü²Ö,­þ¤Ñ®æ¦¡¤S§ï¤F´N¯uªº±ý­úµL²\

¯à§_«Øijª©¥D¶}¥H­Ópy ...
white5168 µoªí©ó 2012-7-26 21:51


Ä@»D¨ä¸Ô~?
¦pªG¦³¦³®Ä²vªº¦n¤èªk§Ú·|«ÜÄ@·N¾Çªº:P

TOP

¤§«e´X­Ó¤ë§ì¤W¥«796®a»P¤WÂd615®aªº¥æ©ö©ú²Ó³Ì¦h¤~ªá2000¦h¬í,²{¦bÃÒ¥æ©Ò¤ë§ï¶VÃø§ì,¦h¥X2­¿ªº®É¶¡¬ù§Ö6000¬í¬ù1¤p®É¦h
³£¬O¥Îpython§ìªº,§A¥i¥H¦Ò¼{¥Îpython§ì·|§ó¦³®Ä²v,©Ò¥H¤~·|«Øijª©¥D¶}£¸­Ópython¥i¥H¤À¨É¤èªk

TOP

¥»©«³Ì«á¥Ñ lalalada ©ó 2012-7-27 01:43 ½s¿è
¤§«e´X­Ó¤ë§ì¤W¥«796®a»P¤WÂd615®aªº¥æ©ö©ú²Ó³Ì¦h¤~ªá2000¦h¬í,²{¦bÃÒ¥æ©Ò¤ë§ï¶VÃø§ì,¦h¥X2­¿ªº®É¶¡¬ù§Ö600 ...
white5168 µoªí©ó 2012-7-26 23:53


¥æ©ö©ú²Ó«ü±o´N¬O§Ú²{¦b­n§ìªºªF¦è¶Ü?
¬O»¡§Ú¥ÎVBA¼g¤W¥«+¤WÂd¦b¤µ¤Ñ§ïª©¤§«e¤@¤p®É¤º¥i¥H·d©w
¨ä¹ê¤]¥u¼g¦n¤£¨ì¤@­Ó§«ô´N§ïª©¤F!!
©¹¨Æ¦p­·Q_Q
PYTHONªº°µªk«ç»ò°µ¥i¥H¸ò§Ú»¡¶Ü?
§ì¤U¨Ó¤§«á¥Îexcel³B²z¸òvba®t¤£¦h¶Ü?
¤£¹LÁÙ¬O¥ý¥Hvba¬°¥D ²¦³º¤ñ¸û¼ô~

TOP

¦pÂsÄý³øªí¹L©óÀWÁc¡AºÃ¦üµ{¦¡§ì¨ú¦æ¬°¡A±N¼È°±±zÂsÄý¨ÃÅã¥Ü°T®§.....!! ²©ö¨Ï¥Î»¡©ú¦³´£¨ìºô­¶¦³­­¨î...
.csv ªº¸ê®Æ¬O¦]¬°","¤À¦ìªºÃö«Y©Ò³y¦¨ªº¦ì²¾..¥k°¼¶R½æ«h¬OµL¸ê®Æªº....
¬O§_¦³°ª¤â¥i±Nall_printÂରÀɮצA±N¥¦§ì¤JEXCEL,¬O¤ñ¸û¥i¦æªº§@ªk........

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD