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

[µo°Ý] ¤éK¶}°ª§C¦¬Âà´«¡u¶gK¡v¶}°ª§C¦¬

¦^´_ 3# bill740615
  1. Sub test()

  2. Cells.Clear

  3. 'stockno = InputBox("¿é¤JªÑ²¼¥N¸¹")

  4. Dim t: t = Timer
  5. Dim myXML As Object
  6. Set myXML = CreateObject("Microsoft.XMLHTTP")

  7. Dim myArr(1 To 1500, 1 To 6)

  8. With myXML
  9.     .Open "GET", "http://jdata.yuanta.com.tw/Z/ZB/ZBH/CZKC0.djbcd?a=EB09999&b=W&c=1440", False
  10.     .send
  11.     myText = .responseText
  12. End With

  13.     myText1s = Split(myText, " ")
  14.     j = 1
  15.     For Each myText1 In myText1s
  16.         i = 1
  17.         myText2s = Split(myText1, ",")
  18.         For Each myText2 In myText2s
  19.             If j > 6 Then Exit For
  20.             myArr(i, j) = myText2
  21.             i = i + 1
  22.         Next
  23.         j = j + 1
  24.     Next

  25. [A2:F2] = Array("¤é´Á", "¶}", "°ª", "§C", "¦¬", "¦¨¥æ¶q")
  26. [A3].Resize(1500, 6).Value = myArr

  27. Set myXML = Nothing

  28. Debug.Print Format(Timer - t, "0.00’")

  29. End Sub
½Æ»s¥N½X
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 2# iamaraymond

¬Oªº¡A·Q»¡¬O¤£¬O¯à±q¤éKÂà´«¹L¥h

TOP

¦^´_ 1# bill740615

³o­Ó¬O­n§ì¤j½Lªº©PK¸ê®Æ¶Ü?
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD