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

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

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

¦U¦ì¥ý¶i¦n¡A¸ÕµÛ¥Î¾ú¥v¸ê®Æ§@JS¨ú±o¸ê®Æ
2014Âd¶R§ïª© ¤@¨Ç«e½úªº¤ß¦å³£¤£¯à¥Î¤F ¥i±¤
¥i¬O¥u¯à¨ú±oªíÀY¡A¥i§_«üÂI¬O­þ¸Ì¥X¿ù~:)

Sub WEBQ()
    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¸ß¤ë¥÷", "°ê¦~/¤ë¥÷")
    If yy = "" Then Exit Sub
   
    stock = InputBox("¿é¤JªÑ²¼¥N½X", "­ÓªÑ")
    If stock = "" Then Exit Sub
    With Sheet1.QueryTables(1)
        .Connection = "URL;http://www.otc.org.tw/ch/emergingstock/single_historical/result.php"
        .PreserveFormatting = False
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebDisableDateRecognition = True
        .PostText = "ajax=true&input_month=" & yy & "&stk_code=" & stock
        .Refresh False
    End With
End Sub

¦^´_ 14# is681003


¤Óºë²¤F ¤£À´·N«ä?
¨º¬q¨Ï¥Î°_¨Ó¬OOKªº
±ß¦^¤F¨Ç~

TOP

¦^´_ 13# joey0415

¤F¸Ñ ¥¨¶q¸ê®Æ¤]¬O­Ó°ÝÃD
µ¥©ó¬O­n¾Ç­Ó·s»y¨¥¦³ÂI¨¯­W
§ÚEXCEL VBA´N¼gªº¤C¤C¤K¤K¤F
­nµ¥¦³¾÷½t¤~·|¦A±µÄ²¤K:)

TOP

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

À³¸Ó¹ï§a

TOP

¦^´_ 12# pbchen
¤W¥«Âd¤U¸üªºCSVÀÉ¡A¨C¤é¬ù¦³15~20MB¡A¦pªG§A¦³¤@¦~´N¦³¦h¤j®e¶q¡A¦ÓEXCEL°ò¥»¤W¬O²³æªí®æ³B²z¡A­n¤j¶qªº¦s´N­n¸ê®Æ®w¡A§Ú±q¥h¦~¤K¤ë¦Ü¤µ¡A´N­n2G¡A¦pªG­nEXCEL­n³B²z³o¼Ëªº¸ê®Æ¡A³t«×®t«Ü¦h¡A§Ú¦Û¤v¬O©ñ¦bSQLITE¤¤¡A·íµMMYSQL   SQL  SERVER  ¥Ò°©¤åµ¥¡A³£¬O¤£¿ùªº¿ï¾Ü¡A¤£µM´N¬O§Ú¦Û¤v§Þ¥©¤Ó®t¡A³y¦¨®e¶q¥¨¤j

TOP

¦^´_ 11# joey0415
:)
½Ð°Ý¸ê®Æ®w¬O«ü?
­Ë¤]¤£¬O­n¥þ³¡ªÑ¸¹³£¬Ý
¥u¬O­Ó¤H¥Î¨Ó´î¤Ö¤W¯Z³Q§ì¥]¦A¬ÝªÑ»ùªºªF¦è°Õ:lol

TOP

¦^´_ 10# pbchen

³o­Ó¸ê®Æ¶q«Ü¤j¡A¤£«Øij©ñ excel¤¤¡A§_«h¹L¨S´X­Ó¤ë¤S­n´«¦a¤è

¸ê®Æ®w¤~¬O³Ì¨Îªº

TOP

½Ð°Ý°ª¤â:)
°ò©ó­ì¬d¸ßµ{¦¡WebQ000µ{¦¡
§Ú¤S¼g¤F¤@­Ó¦Û°Ê¤À­¶ªºµ{¦¡Addpage000
·Q¹ê²{
1.¨Ì¦W³æ"list"¦Û°Ê²£¥Í"ªÑ¸¹§O"¤À­¶
2.°»´ú¬°¨C¤À­¶ªÅ¥Õ«á¦Û°Ê¶K¤W¸ê®Æ
½Ð°Ý¬O­þ¸Ì¥X¤F¿ù?
¥i§_«üÂI¤@¤U~?
-------------------------

Sub Addpages000()               'OKªº¦Û°Ê¤À­¶
Dim ii, yy                     'ii¦Û°Ê¼Ælist  yy¦~/¤ë
Dim stock                      'stockªÑ¸¹»Pªí¦W
Dim ptxt As String             '³s½u¥Î
ii = 2                         '°_©l
yy = 103 / 1                   '¥ý¥Î©w¼Æ

Do While Worksheets("list").Cells(ii, 1) <> ""
    stock = Worksheets("list").Cells(ii, 1)
    Worksheets.Add
    ActiveSheet.Name = stock
   
    Application.Wait Now + TimeValue("00:00:01")         'wait 1s
   
    ii = ii + 1
Loop
   
End Sub



Sub WebQ000()                                                                'OKªººô¸ô¬d¸ß

    Dim ptxt As String
    Dim yy, stock
    Dim ii
   
    ii = 2
    yy = 103 / 1
    stock = Worksheets("list").Cells(ii, 1)
   
   
    If Worksheets("list").Cells(ii, 1) = 0 Then
        Worksheets(ii).Selection
        ActiveSheet.QueryTables.Add Connection:="URL;", Destination:=Range("A1")
        .Connection = "URL;http://www.otc.org.tw/ch/emergingstock/single_historical/result.php"
        .PreserveFormatting = False
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebDisableDateRecognition = True
        .PostText = "ajax=true&input_month=" & yy & "&input_emgstk_code=" & stock
        .Refresh False
   
        Application.Wait Now + TimeValue("00:00:01")         'wait 1s
   
         ii = ii + 1
    Else: Exit Sub
    End If
-----------------------------------------------
test004¦Û°Ê¤À­¶Àx¦s.rar (14.86 KB)

TOP

¦^´_ 5# joey0415
ªGµM³£¬O¦æ®a¡A¥»¨Ó§ÚÁÙ¦b©ê«èµÛ¬°¤°»ò¤£»¡²M·¡¤@ÂI¡A­ì¨Ó¬O¦Û¤v¬O²Â©å¤£·|¥Îºô­¶¶}µo¤u¨ã¡Aªá¤F¤@ÂI®É¶¡¤~ºN¨ì¥ÛÀY¹Lªe¡A§A­Ì³£¬O§Úªº¦Ñ®v§r¡I
«Ü©êºp¡A§Ú¬O¤p¾Ç¥Í¡A¤£¯à¤U¸üÀɮסA¬O­Ó¤p§¾«Ä¡I

TOP

¦^´_ 3# stillfish00
¯uªº«Ü¼F®`¡A¹L¥h§Ú³£¬Ýºô­¶¤º®e©Ç¤£±o¤U¿ù°Ñ¼Æ¡A­ì¨Ó¬O­n[ÀË´úºô¸ô­n¨D]¡A¬d¬Ý[½Ð¨D¤º®e]­n³o¼Ë§ä¤~¯à§ä¨ì¯u¥¿ªº°Ñ¼Æ¡C
Thanks!:lol
«Ü©êºp¡A§Ú¬O¤p¾Ç¥Í¡A¤£¯à¤U¸üÀɮסA¬O­Ó¤p§¾«Ä¡I

TOP

        ÀR«ä¦Û¦b : ®É®É¦n¤ß´N¬O®É®É¦n¤é¡C
ªð¦^¦Cªí ¤W¤@¥DÃD