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

[µo°Ý] ¦p¦ó±N¤U¸ü¤U¨Óªº¸ê®Æ«O«ù­ì¨Ó®æ¦¡

[µo°Ý] ¦p¦ó±N¤U¸ü¤U¨Óªº¸ê®Æ«O«ù­ì¨Ó®æ¦¡

¦p¤U¹Ï
¦¹¹Ï ¬O§Ú¥ÑTWSE¦Û°Ê¤U¸üªº¸ê®Æ ¦ý¬O¦³¨ÇªÑ²¼¥N½X¬O00¶}ÀYªº «o¨S¿ìªk«O«ù­ì¨Óªº¼Æ­È ·Q½Ð¨D¦U¦ì¦Ñ¤â¨ó§U


¦^´_ 1# zheng211016


    ¤p§Ìª½Ä±¤£Ãø¸Ñ¨M¡AAÄ椺®e©T©w¬OªÑ²¼¥N¸¹ªº¸Ü¡A¥i¹Á¸Õ¡G
   1.¸ü¤JAÄ椺®e«e¡AÀx¦s®æ[®æ¦¡]>[Ãþ§O]¥ý§ï¦¨[¤å¦r]¸Õ¸Õ¬Ý
   2.©Î§iª¾¤U¸ü¤º®eºô§}§ÚÀ°§A¸Õ¤@¤U
   3.©Îª½±µµ¹EXCELÀɮקÚÀ°§A¸Õ¤@¤U

TOP

http://www.twse.com.tw/exchangeReport/MI_INDEX?response=html&date=20180427&type=ALLBUT0999
³Â·Ð±z¤F

TOP

¦^´_ 3# zheng211016

­n¤£­n¸Õ¸Õ¬ÝVBAªº¤èªk?
  1. Sub test()

  2. 'Dim t: t = Timer

  3. Cells.Clear

  4. Dim myXML As Object
  5. Set myXML = CreateObject("Microsoft.XMLHTTP")

  6. Dim myHTML As Object
  7. Set myHTML = CreateObject("HTMLFile")

  8. With myXML
  9.     .Open "GET", "http://www.twse.com.tw/exchangeReport/MI_INDEX?response=html&date=" & Format(Now(), "yyyy/mm/dd") & "&type=ALLBUT0999", False
  10.     .send
  11.    
  12.     myHTML.body.innerHTML = .responseText
  13.     Set myTable = myHTML.getElementsByTagName("Table")(4)
  14.     i = 1
  15.    
  16.     For Each myRow In myTable.Rows
  17.         j = 1
  18.         For Each myCell In myRow.Cells
  19.             If j = 1 Then
  20.                 Cells(i, j) = "'" & myCell.innerText
  21.             Else
  22.                 Cells(i, j) = myCell.innerText
  23.             End If
  24.             j = j + 1
  25.         Next
  26.         i = i + 1
  27.     Next
  28.    
  29. End With

  30. Set myXML = Nothing

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

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

TOP

¦^´_ 4# iamaraymond
ÁÂÁ¤j¤j ªG¯u¥i¥H ¤S¨³³t ¤p§Ì·P¿E¤£ºÉ

TOP

¦^´_ 5# zheng211016

­Y¦³°ÝÃD¦A´£¥X~
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦pÆp¥Û¡j®É¶¡¹ï¤@­Ó¦³´¼¼zªº¤H¦Ó¨¥¡A´N¦pÆp¥Û¯ë¬Ã¶Q¡F¦ý¹ï·M¤H¨Ó»¡¡A«o¹³¬O¤@§âªd¤g¡A¤@ÂI»ù­È¤]¨S¦³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD