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

[µo°Ý] 2014Âd¶R§ïª©

§Ú¤]¨Ó´ú¸Õ¤@¤U¡Aªº½T¥i¥Hwork!
¦ý¬O
.WebSelectionType = xlEntirePage
·|§ì¤Ó¦h¤£¥²­nªº¸ê®Æ
---------------------
Sub WEBQ()
' ¿³Âd­ÓªÑ¾ú¥v¦æ±¡

    Dim ptxt As String
    Dim yy, stock
    Sheet1.Activate
    If Sheet1.QueryTables.Count = 0 Then
        Sheet1.QueryTables.Add Connection:="URL;", Destination:=Range("A1:E1")
    End If
    'yy = InputBox("¿é¤J¬d¸ß¤ë¥÷", "°ê¦~/¤ë¥÷")
    yy = "103/02"
    If yy = "" Then Exit Sub
   
    'stock = InputBox("¿é¤JªÑ²¼¥N½X", "­ÓªÑ")
   '4990 ´¹¬ü
    stock = "4990"
    If stock = "" Then Exit Sub

    With Sheet1.QueryTables(1)
        .Connection = "URL;http://www.gretai.org.tw/ch/emergingstock/single_historical/history.php"
        .PreserveFormatting = False
        .WebSelectionType = xlAllTables
        .WebFormatting = xlWebFormattingNone
        .WebDisableDateRecognition = True
        .PostText = "ajax=true&input_month=" & yy & "&input_emgstk_code=" & stock
        .Refresh BackgroundQuery:=False
    End With
'
End Sub
«Ü©êºp¡A§Ú¬O¤p¾Ç¥Í¡A¤£¯à¤U¸üÀɮסA¬O­Ó¤p§¾«Ä¡I

TOP

¤@¸Õ§Y¦¨ ¦hÁ¤Ӥӫü±Ð
­ì¨Ó¬OJS¸Ì­±ªº¦WºÙ¦³»~
¤À¨Éµ¹¦³»Ý­nªº¦P¾Ç
testQuery2.rar (18.38 KB)


±µµÛ¶}©l¾Ç¤U¤@¶¥¬q:)

TOP

¦^´_ 3# stillfish00
¦æ®a¤@¥X¤â¡A´Nª¾¦³¨S¦³

À´ªº´Nª¾¹D

ÁöµM§Ú²{¦b¤£§ì¤F

TOP

¦^´_ 3# stillfish00

¦hÁ¬í¦^
¤£¹L¤@ª½¶}±Ò¤£¤F®a¤¤ªº ¶}µo¤H­û¿ï¶µ
¥u¯à©ú¤Ñ¦A¸Õ¤F ¦A¦¸·PÁÂ~:handshake

TOP

¦^´_ 1# pbchen

.PostText = "ajax=true&input_month=" & yy & "&input_emgstk_code=" & stock

TOP

Ãä·QÃäµo §Ñ¤Fªþ¥ó~:)
testQuery.rar (16.7 KB)

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