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

Ãö©óµ{¦¡½X?§ì¨ú¤W¥«¸ê®Æ-

Ãö©óµ{¦¡½X?§ì¨ú¤W¥«¸ê®Æ-

¥»©«³Ì«á¥Ñ vavashop ©ó 2016-5-3 16:43 ½s¿è

¦U¦ì¤j¤j¥H¤U¬O¤§«e§Ú¦b§ì
¤W¥«¤T¤jªk¤Hªºvba
http://www.twse.com.tw/ch/trading/fund/T86/T86.php
¤£¹L³ÌªñÅܤF
¤£ª¾¹D½Ð°Ý¨ºÃ䦳°ÝÃD¥i¥HÀ°¦£¤@¤U§Ú¶Ü?


µ{¦¡½X¦p¤U
Sub §ó·s¤W¥«¤T¤jªk¤H1_1()
'

'

'
    Dim xDate As Date, genpage As String, qdate As String, Print_php As String, Wb As Workbook
   
    '1 ¦p¤£¥i¬d¸ß·í¤é ¤T¤jªk¤H¶R½æ¶W¤é³ø
    xDate = Date - 0  '0§ï¬°1Åܦ¨ «e¤@¤Ñ
   
   
    Do While Weekday(xDate, vbMonday) >= 6
        xDate = xDate - 0  '0§ï¬°1Åܦ¨ «e¤@¤Ñ
   
    Loop
   
    '¦p©ó¤@©wªº®É¶¡«á¥i¬d¸ß·í¤éªº ¤T¤jªk¤H¶R½æ¶W¤é³ø
    '½Ð§R°£ ** xDate = Date - 1 **
   
   
    '2 °õ¦æ¤U­±ªºµ{¦¡½X,¨ú®øµù¸Ñ ** ' **
   
    'If xDate = Date And Time < #5:00:00 PM# Then
    '    xDate = xDate - 1
    'End If
   
    For Each Wb In Workbooks
        If Trim(Wb.Name) = "print.php" Then Wb.Close False
        '¤U¸üCSV ªº¦WºÙ¬° Print_php ¥²¥ýÃö³¬
    Next
    genpage = Format(xDate, "yyyymm/yyyymmdd")
    qdate = Format(xDate, "yyyymmdd")
    Print_php = "http://www.twse.com.tw/ch/trading/fund/T86/print.php?edition=ch&filename=genpage/" _
             & genpage & "_2by_issue.dat&type=csv&select2=ALLBUT0999&qdate=" & qdate

     Set Wb = Workbooks.Open(Print_php)

¦^´_ 1# vavashop

¦pªG¤W­±³£¬O§A¼gªº¡A¨ºÀ³¸Óª¾¹D§ï«Ü¤[¤F

­×§ïÀ³¸Ó¤£¬OÃø¨Æ

¤U­±³o­Ó³sµ²¡A¾Ç·|«á¦Û¤v´N·|­×§ï

http://club.excelhome.net/thread-1159783-1-1.html

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD