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

[µo°Ý] ºô­¶¸ê®Æ¤U¸ü¦¨pdf²§±`¦aºC?

[µo°Ý] ºô­¶¸ê®Æ¤U¸ü¦¨pdf²§±`¦aºC?

¨Ï¥Î³Ì´¶¹Mªº¤èªkMicrosoft.XMLHTTP +ADODB.STREAM
¤U¸ü https://mm.jpmorgan.com/OpenPubServlet?action=latest&publication=9000024 ªºpdfÀÉ
¦ý¬O³t«×«oÅå¤HªººC... ±µªñ30¬í
¥Î¬Û¦P¤èªk¤U¸ü¨ä¥L¸ê®Æ ¦p http://ichart.finance.yahoo.com/table.csv?s=2498.TW&d=4&e=10&f=2013&g=d&a=2&b=26&c=2002&ignore=.csv
¥u»Ý­n¤@Àþ¶¡(¦]¬°Àɮ׮榡ªºÃö«Y¶Ü? pdf v.s. csv)
ÁöµM¦³¤U¸ü¦¨¥\ ¥i¬O¨ä¤¤µo¥Í¤F¤°»ò°ÝÃD ¯à§ïµ½¶Ü?
ÁÂÁÂ!
  1. Sub download1()
  2. 'On Error Resume Next
  3. DataDate = Year(Date) & "-" & Format(Month(Date), "00") & "-" & Day(Date)
  4. myURL = "https://mm.jpmorgan.com/OpenPubServlet?action=latest&publication=9000024"


  5. Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
  6. WinHttpReq.Open "GET", myURL, False
  7. WinHttpReq.Send

  8. myURL = WinHttpReq.ResponseBody
  9. If WinHttpReq.Status = 200 Then
  10.     Set oStream = CreateObject("ADODB.Stream")
  11.     oStream.Open
  12.     oStream.Type = 1
  13.     oStream.Write WinHttpReq.ResponseBody
  14.     oStream.SaveToFile ("D:\Dropbox\Stock\Research Reports\JPM Top Stories\JPM_J.P._Morgan_FTM_10_M_" & DataDate & ".pdf")
  15.     oStream.Close
  16. End If
  17. 'On Error GoTo 0

  18. End Sub
½Æ»s¥N½X

¦^´_ 12# ­ã´£³¡ªL

®@®@¤F¸Ñ! ·PÁ§A~

¥[¤J¶Ã¼Æ¦³®Ä¬O¦]¬°?«á­±ªºªF¦è´N¬O¨Ï¥Îpost®É¥á³£¶i¥hªº°Ñ¼Æ
¬JµM¥á¤F°Ñ¼Æ
¹ï¤è¦øªA¾¹´N·|¦^À³ ©Ò¥H¥i¥H¨ú±o³Ì·s¸ê®Æ
¦]¬°¥¦¹ê»Ú¤W´N¸òpost¤@¼Ë
¤£¾A¥Îªº±¡ªp¦P²z

¬Ý¨Óget¬O¥h¨ú±o¼È¦sÀÉ(?)

TOP

¦^´_ 11# lalalada

¢°¡Ddim «á­±ªº$©M&¬O«ü©w«¬§Oªº·N«ä§a?
¡Ä¡Ä¥i¥H°Ñ¦Ò¶W¯Åª©¥Dªº»¡©ú¡Ghttp://forum.twbts.com/redirect. ... 22366&ptid=3820

¢±¡D¡eget¡f¡epost¡f¬°¦ó¦³®t¡H
¡Ä¡Ä¤£¬Oexcel¤Îvba¥¿¬ì¡A®Ú¥»¤£À´¨ä¾÷¨î¡A¬Ý¹L¶W¯Åª©¥Dªºµ{¦¡½X«D±`¹D¦a¦Ó±M·~¡A©Î³\¥i¥H´£¨Ñ±M·~ª¾ÃѤÀ¨É¡I
¡@¡@¥t¡A¦bºô§}¤W¥[¤JÅܰʰѼơA¨Ï¥Î¡eget¡f¤]¥i§ì¥X³Ì·s¼Æ¾Ú¡A¦ý¥i¯àµLªk¾A¥Î©Ò¦³ªººô§}¡A¨Ò¦p¡G
¡@¡@QcURL = "http://www.post.gov.tw/post/internet/index.jsp?" & Rnd
¡@¡@³o¤]¬Oª¾¨äµM¦Ó¤£ª¾¨ä©Ò¥HµM¡A¤j·§ie¦³¦Û°Ê®Õ¥¿ºô§}ªº­ì¦]§a¡I¡]²q¡^

¢²¡D´ú¸Õ½X¦]±q´X­Ó¤lµ{§Ç¤¤´ê¦¨¡A¤@®É±N´N¡F¸g¶Q¤âºë²«á¡A¬Ý°_¨Ó²M²n³\¦h¡I^ ^
¡@¡@¦]¬°¦³¤ÏÂШú«ü©w¦r¦ê»Ý¨D¡A¤@¯ë·|¥H¤lµ{§Ç©Îfunction¨Ó©I¥s¡A¬ù²¤¦p¤U¡G
Sub ¨ú±o«ü©w¦r¦ê()
Dim uTxt$, T1$, T2$
uTxt = "©Ò¦b¦a¡G¥xÆW¡A¤é´Á¡G102¦~5¤ë19¤é¡A¬P´Á§O¡G¬P´Á¤é¡A®É¶¡¡G12:52:24(TM)"
T1 = "¤é´Á¡G": T2 = "¡A¬P´Á"
MsgBox Get_String(uTxt, T1, T2)
T1 = "®É¶¡¡G": T2 = "(TM)"
MsgBox Get_String(uTxt, T1, T2)
End Sub

Function Get_String(xStr$, xT1$, xT2$) As String
Dim X1%, X2%
X1 = InStr(xStr, xT1)
If X1 > 0 Then X2 = InStr(X1 + Len(xT1), xStr, xT2)
If X2 = 0 Then Exit Function
Get_String = Mid(xStr, X1 + Len(xT1), X2 - X1 - Len(xT1))
End Function

«D¥¿²Îªºµ{¦¡½X¡A¬Ý¬Ý´N¦n¡I

TOP

¦^´_ 10# ­ã´£³¡ªL

¶Ù~
·PÁ¦^ÂÐ!
¬Ý§¹³o¨Çµ{¦¡½X¤S¦h¾Ç¤F¤@¨ÇªF¦è :P
dim «á­±ªº$©M&¬O«ü©w«¬§Oªº·N«ä§a?

¸g¹L´ú¸Õ
¨Ï¥Îget¥u¦³²Ä¤@¦¸¦³®Ä
post«h¯à¤@ª½Àò¨ú·í«e®É¶¡
¤£¹Lget«ápost¨ÌµM¦³®Ä
¥i¬O¤£¤F¸Ñ¬°¤°»ò....?

¥t¥~¤@®É¿³°_´N¸ÕµÛ§âµ{¦¡½X²¤Æ¦p¤UXD
  1. Sub ´ú¸Õ_1()
  2. Dim QcURL$
  3. On Error GoTo 101
  4. QcURL = "http://www.post.gov.tw/post/internet/index.jsp"
  5. With CreateObject("Microsoft.XMLHTTP")
  6.      .Open "post", QcURL, False
  7.      .send
  8.      test1 = Split(Split(.responseText, "¥xÆW®É¶¡¡G</span> <span class='time'>&nbsp;")(1), "&nbsp;GMT+8:00  </span></td>")(0)
  9. End With
  10. [A65536].End(xlUp)(2) = Replace(Replace(test1, "&nbsp", ""), ";", "")
  11. 101: End Sub
½Æ»s¥N½X

TOP

¡Õ´ú¸Õ½X¡Ö
Sub ´ú¸Õ_1()
Dim QcURL$, uTxt$, X1&, X2&
On Error GoTo 101
QcURL = "http://www.post.gov.tw/post/internet/index.jsp"
With CreateObject("Microsoft.XMLHTTP")
     .Open "post", QcURL, False
     .send
     uTxt = .ResponseText
End With
'---------------------------
T1 = "¥xÆW®É¶¡¡G</span> <span class='time'>"
T2 = "GMT+8:00  "
X1 = InStr(uTxt, T1)
If X1 > 0 Then X2 = InStr(X1 + Len(T1), uTxt, T2)
If X2 = 0 Then Exit Sub
uTxt = Mid(uTxt, X1 + Len(T1), X2 - X1 - Len(T1))
'---------------------------
uTxt = Replace(Replace(uTxt, "&nbsp", ""), ";", "")
If Len(uTxt) = 0 Then Exit Sub
[A65536].End(xlUp)(2) = uTxt
101: End Sub

½Ð¦A½Æ»s¤@¥÷¡A§ï¬°¡eSub ´ú¸Õ_2()¡f¡A¥B±N¡epost¡f§ï¬°¡eget¡f¡I

ÀË´ú°õ¦æ¡G
¢°¡D¥ý°õ¦æ´X¦¸¡e´ú¸Õ¢°¡f¡A¬Ý¤å¦r¦ê«á­±ªº®É¶¡¬O§_¦³§ó·s¡H¡Ä¡Ä102¦~5¤ë19¤é¬P´Á¤é12:52:24
¢±¡D¦A°õ¦æ´X¦¸¡e´ú¸Õ¢±¡f
¢²¡D±µµÛ¦A°õ¦æ¡e´ú¸Õ¢°¡f

¥H§Úªº¢Þ¢Ñ´ú¸Õ¡G
¦b¥¼°õ¦æGET«e¡APOST³£¥i¥H¨ú±o³Ì·s®É¶¡¡F°õ¦æGET«á¡A«áÄò³£¬O§ì¨ì®ɶ¡¡A§Y¨Ï¦Aªð¦^°õ¦æPOST¤]¬O¤@¼Ë¡I
¤£¹L±zªº¢Þ¢Ñ¨Ã¤£¤@©w¦p¦¹¡A°Ñ¦Ò§Y¥i¡I

TOP

¦^´_ 6# mark15jill

§A¦n~·PÁ¦^ÂÐ!
§Ú¤]¦³ª`·N¨ìºô§}µ²§À¨Ã¤£¬OPDF
½Ð°Ý¦³¨S¦³¿ìªk±o¨ì¤å¥óªº¯u¹ê¦ì§}©O?

TOP

¦^´_ 7# ­ã´£³¡ªL

§A¦n! ·PÁ¦^ÂÐ
§Ú¤j·§·|¥ÎPOST¸òGET¨âºØ¤èªk¨ú±o¸ê®Æ
­Ó¤H²z¸ÑPOST¬O¦³µo¥X°T®§µ¹¹ï¤è¦øªA¾¹
¦øªA¾¹¦A®Ú¾Ú°T®§µ¹¤©¹ïÀ³ªº¸ê®Æ
GET«h¬O³æ¯Â¦s¨ú
½Ð°Ý³o¼Ëªº²z¸Ñ¥¿½T¶Ü?
¤SPOST¤£ºë½Tªº·N«ä¬O¤°»ò...?

TOP

¨Ï¥Î¡eXMLHTTP¡f»yªk¡A¦³®É·|¦³¦p¤Uª¬ªp¡G
²Ä¢°¦¸°õ¦æºC¡@¡Ö¡@Ãþ¦ü±q¶Ç¯u¾÷±µ¦¬¡e¥¿¥»¡f¤å¥óªº¡e°Æ¥»¡f¡A±q¡eµL¡f¨ì¡e¦³¡f¡AÁ`¬O­nµ¥¨Ç®É¶¡
²Ä¢±¦¸¥H«á°õ¦æ§Ö¡@¡Ö¡@¥u¬O®³¨ì¡e¶Ç¯u°Æ¥»¡fªº¡e¼v¦L¥»¡f
¦pªG¡e¥¿¥»¡f¨C¤Ñ§ó·s¡AÁÙ¬O¥²¶·­«·s°õ¦æ¶Ç¯u°Ê§@¡A¨ú±o³Ì·sªº¡e°Æ¥»¡f¡A¯Ó¶Oªº®É¶¡¬Û¦P¡A
°²¦p¨C¦¸¤U¸ü³£¬O­n¨ú±o³Ì·sª©¥»¸ê®Æ¡A­Y¤U¸ü³t«×²§±`ªº§Ö¡A¥²¶·¥h½T»{¬O§_¬°³Ì·s¡I

¦b¬Y¨Ç¢Þ¢Ñ¤W¡A§Y¨ÏÃö±¼ºô¸ô³s½u¡AÁÙ¬O¥i¥H¤U¸ü¤å¥ó¡A¦]¬°¡e¶Ç¯u°Æ¥»¡fÁÙ¦b¼È¦s°Ï¡A§ì¨ìªº¤å¥ó¡A¦³¤H§Î®e¬°¡e°­¼v¡f¡I
ºô¤W¥h¬d¤@¤U¡eGET¡f¤Î¡ePOST¡fªº®t§O¡A¦ý§ï¥Î¡ePOST¡f¦³®ÉÁÙ¬O¤£°÷ºë½T¡I

¥H¤W¯Â¬°­Ó¤H¹ê§@¸gÅç¡A¨Ã«D¤@©w¬O¦p¦¹¡A¶È¨Ñ°Ñ¦Ò¡I

TOP

¦^´_ 5# lalalada


    ºô§}¦³¨âºØ
¤@ºØ¬O ¼ÐÃD¦C¨ºÃ䪺ºô§}
¥t¥~¤@ºØ¬O' ¤å¥óªººô§}
ÁöµM¦³®É­Ô  ²Ä¤@ºØºô§} ¬O¬Û¦P   ¥i¬O  ¸Ì­±ªº³sµ²ºô§}·|¤£¦P
©Ò¥H ¼È¦sÀɤ£·|¬O¬Û¦P~~
Á|¨Ò¨Ó»¡
³Â»¶®a±Ú°Q½×°Ïªººô§}¬° http://forum.twbts.com/
¸Ì­±ªº¤å³¹¦C ¤S·|¬O¥t¥~¤@ºØºô§}
¦Ó ¦pªG¦³ªþ¥ó¤U¸ü  ¤S·|¬O¥t¥~¤@ºØ

¦Ü©ó¤èªk...
¨º­ÓÁÙ¨S¬ã¨s£¾£¾ ©êºp

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 4# mark15jill

¤F¸Ñ~
·PÁ«ü±Ð:)
½Ð°Ý...­«½Æ¶]¨â¦¸(¾B½ª²Ä¤@¦¸)¬O¤°»ò·N«ä(?)
³o¼Ë¶]²Ä¤@¦¸ªº®É­ÔÁÙ¬O­n¤@¼Ë¤[¤£¬O¶Ü?
¬JµMºô§}³£¤@¼Ë
¦³¨S¦³¿ìªk§â¼È¦sÀɯd¤U¨Ó©O?

TOP

        ÀR«ä¦Û¦b : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD