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

½Ð°Ý¦p¦ó±Nºô­¶ªº¹Ï¤ù¦sÀÉ

½Ð°Ý¦p¦ó±Nºô­¶ªº¹Ï¤ù¦sÀÉ

With CreateObject("InternetExplorer.application")           
        .Visible = True                                       
        .Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
      
        Do Until .ReadyState = 4               
            DoEvents
        Loop
Set img = .document.all.tags("img")(0)
end with
½Ð°Ý§Ú¦p¦ó§âimg³o­Ó¹Ï¦s¦¨c:\2.png

·PÁÂGBKEE¤j¤jªº¦^µª!
Private Sub ºô¸ô¹Ï¤ù¦sÀÉ(img As String)
    Dim xml As Object     '¥Î¨Ó¨ú±oºô­¶¸ê®Æ
    Dim stream            'As ADODB.stream   '¥Î¨ÓÀx¦s¤G¶i¦ìÀÉ®×
    Set xml = CreateObject("Microsoft.XMLHTTP")
    Set stream = CreateObject("ADODB.stream")
    xml.Open "GET", img, 0
    xml.send
    With stream
        .Open
        .Type = 1
        .write xml.ResponseBody
        If Dir(¹Ï§Î) <> "" Then Kill ¹Ï§Î
        .SaveToFile (¹Ï§Î)
        .Close
    End With
End Sub
¥H³o¤è¦¡¤U¸üªº¹Ï¤ù»PIE­¶­±ªº¹Ï¤£¬O¬Û¦Pªº¹Ï
­n¦p¦ó¤U¸ü¦^¨Óªº¬OIE­¶­±ªº¹Ï,¦]¬°¥¦¬OPNGÀÉ
§Ú¸Õ¤F´XºØ¤è¦¡³£¨S¿ìªk¬OIE­¶­±ªº¹Ï,ÅçÃÒ½Xªº
¹Ï­nÂনBMP®æ¦¡¤~¯à°µ2­È¤Æªº³B²z.¦pªG¤£¬OPNG
Àɪº¸Ü¥ÎGetClipboardData´N¥i¥H³B²z¤F!¤@ª½·Q
¯}ÀY­Ó¤Hªº¥\¤O¹ê¦b¤Ó²L¤FÁÙ¦b¾Ç²ß¤¤!§Æ±æ¦Ñ®v
¯à´£ÂI¤@¤U!

TOP

´ú¸Õ§¹µo²{ÅçÃÒ½X¿é¤J­¶­±¤Wªº½X»P¦sÀɹϤWªº½X³£¬OOKªº??

TOP

¤U¸üªº¹Ï¤ù»PIE­¶­±ªº¹Ï¤£¬O¬Û¦Pªº¹Ï
¾É¤J³£·|"ÅçÃÒ½X¤w¹O´Á¡A½Ð­«·s¬d¸ß"
¥¢±Ñ!¦p¦ó§ì¤U¨Ó¹Ï¬Oie­¶­±Åã¥Üªº¹Ï¤ù«¨?

TOP

­ì¨Ó¬OÅçÃÒ½Xtessdata-OCRµø§O¿ù»~!

TOP

Sheets("¤WÂdªÑ²¼").Activate
    With CreateObject("InternetExplorer.application")           '³Ð«Ø¤@­ÓªÅªºie
        .Visible = True                                         'Åýie¥i¨£
        .Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
        Do Until .ReadyState = 4               'µ¥«Ýie§¹²¦¸ü¤J
            DoEvents
        Loop
         code = InputBox("¿é¤JÅçÃÒ½X", "code", code)
        For Each stock In Range([a2], [a65536].End(xlUp))'ªÑ²¼¥N¸¹

        .Document.ALL("stk_code").Value = stock '¶ñ¼gªÑ²¼¥N¸¹
        .Document.ALL("auth_num").Value = code '¶ñ¼gÅçÃÒ½X
     
    With Sheets("web")
      .Cells.Delete
      .QueryTables.Add Connection:="URL;", Destination:=.Range("A1")
      
    With .QueryTables.Add(Connection:="URL;http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/download_ALLCSV.php?curstk=" & stock & "&stk_date=" & ¤é´Á & "&auth=" & code & "", Destination:=.[a1])
        .AdjustColumnWidth = False
        .WebFormatting = xlWebFormattingNone
        .WebDisableDateRecognition = False
        .Refresh BackgroundQuery:=False
    End With
   
    .Columns("A:A").TextToColumns Destination:=.Range("A1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
        Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
        :=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
        Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1)), _
        TrailingMinusNumbers:=True
        
    End With
End With
¤WÂdÅçÃÒ½X¦³60¬íªº¦³®Ä©Ê,¥u­n¥´­Ó10¨Ó¦¸´N¥i¤U¸ü§¹!

TOP

Sheets("¤WÂdªÑ²¼").Activate
    With CreateObject("InternetExplorer.application")           '³Ð«Ø¤@­ÓªÅªºie
        .Visible = True                                         'Åýie¥i¨£
        .Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
      
        Do Until .ReadyState = 4               'µ¥«Ýie§¹²¦¸ü¤J
            DoEvents
        Loop
       code = InputBox("¿é¤J¬d¸ßcode", "code", code)
        For Each stock In Range([a2], [a65536].End(xlUp))
        .document.All("stk_code").Value = stock
        .document.All("auth_num").Value = code 'Cells(1, 1)
   
    With Sheets("web")
    .Cells.Delete
      .QueryTables.Add Connection:="URL;", Destination:=.Range("A1")
       DoEvents
    With .QueryTables.Add(Connection:="URL;http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/download_ALLCSV.php?curstk=" & stock & "&stk_date=" & ¤é´Á & "&auth=" & code & "", Destination:=.[a1])
        .AdjustColumnWidth = False
        .WebFormatting = xlWebFormattingNone
        .WebDisableDateRecognition = False
        .Refresh BackgroundQuery:=False
    End With
   
    .Columns("A:A").TextToColumns Destination:=.Range("A1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
        Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
        :=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
        Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1)), _
        TrailingMinusNumbers:=True
        If .[a4] = " " Then .Cells.Delete: GoTo a
    End With
        If Sheets("web").[a4] = "ÅçÃÒ½X¤w¹O´Á¡A½Ð­«·s¬d¸ß" Then
        stock.Offset(, 2) = "ng"
        .Quit
        
        .Visible = True                                         'Åýie¥i¨£
        .Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
        Do Until .ReadyState = 4               'µ¥«Ýie§¹²¦¸ü¤J
            DoEvents
        Loop
      
         code = InputBox("¿é¤J¬d¸ßcode", "code", code)
                GoTo a
        End If
    ¾ã­¶¤U¸ü    '¸ê°T¾ã²z
    a:
     Next
      End With
µ{§Ç«Ü¶Ã¬Û¤¬°Ñ¦Ò¤@¤U!

TOP

        ÀR«ä¦Û¦b : ¡i°±º¢¤£«e¡A²×µL©Ò±o¡j¤H³£°g©ó´M§ä©_ÂÝ¡A¦]¦Ó°±º¢¤£«e¡FÁa¨Ï®É¶¡¦A¦h¡B¸ô¦Aªø¡A¤]¤FµL¥Î³B¡A²×µL©Ò±o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD