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

[µo°Ý] ¦³Ãö©ó¼´ªÑ²¼Code°ÝÃD

Set myTable = myHTML.getElementsByTagName("table")(6)
§ï¦¨
Set myTable = myHTML.getElementsByTagName("table")(5)

TOP

¦^´_ 11# iamaraymond


    i ¤j§A¦n,·Q½Ð±Ð¤@¤Uªþ¥ó¬O±z¤§«e´£¨Ñµ¹§Úªºcode ·sÀ£ÁY (zipped) ¸ê®Æ§¨.zip (15.03 KB) ,¤§«e³o­Ócode³£¯à¥¿±`¹B§@,½Ð°Ý²{¦bµLªkwork..ÅܼƤÎwith³£¦³³]©w,¬°¦óÁÙ¬O¦³°ÝÃD©O~~¨D¨ó§U
yvonne

TOP

TOP

¦^´_ 13# iamaraymond


    «D±`·PÁÂi¤jªº¨ó§U¡C¡C¥i¥Hwork¤F¡C¡C¯uªº¤Ó·PÁ¤F
yvonne

TOP

¦^´_ 9# afu9240

©Ò¥H...½Ð°Ý³Ì«á¦³¸Ñ¨M±zªº°ÝÃD¶Ü?
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

http://forum.twbts.com/thread-20755-1-1.html
¦Û³Ðªº °e§A¨Ï¥Î¤£¥Î«È®ð

TOP

¦^´_ 9# afu9240

°Ú§Úª¾¹D±zªº·N«ä¤F
¦]¬°¦b¥Î³o¤èªk§ì¸ê®Æ®É¡A¥L·|¦³¤@­Ó¹³¬O"°O¾Ð"ªº¥\¯à(½T¤Áªº±M¦³¦Wµü§Ú¤£¤Ó²M·¡)
¤]´N¬O»¡­Yµo°eªº¬O¦P¤@­Órequest¡A¨º¥L´N·|®³¨ì¸ò¤W¦¸¤@¼Ëªº¸ê®Æ(³o¤]¬O¬°¤°»ò·í§A¦b°õ¦æ²Ä¤G¦¸¡B²Ä¤T¦¸µ{¦¡®É¡A¥L·|°õ¦æªº¶W§Ö)
©Ò¥H¸Ñ¨M¤è¦¡´N¬O"Åý¥Lµo°e¤£¤@¼Ëªºrequest"
¨Ò¦p¦b°Ñ¼Æ¦h¥[¤@­Ótimer¡A¨C¦¸µo°eªº®É­Ô¥L´N·|¥H¬°¬O¤£¤@¼Ëªºrequest¤F¡A¦ý¹ê»Ú¤W³o­Ótimer¨Ã¤£·|¼vÅT¨ì§A§ì¨ìªº¸ê®Æ
·PÁ±z¤SÅý§Ú¤W¤FÄ_¶Qªº¤@½Ò
  1. Sub test()

  2. Dim myXML As Object
  3. Set myXML = CreateObject("Microsoft.XMLHTTP")

  4. Dim myHTML As Object
  5. Set myHTML = CreateObject("HTMLFile")


  6. i = 2
  7. With myXML
  8.     For Each stockNo In Range("A2:A4").Value
  9.         .Open "GET", "https://tw.stock.yahoo.com/q/q?t=" & Timer & "&s=" & stockNo, False
  10.         .send
  11.    
  12.         myHTML.body.innerHTML = .responseText
  13.         
  14.         Set myTable = myHTML.getElementsByTagName("table")(6)
  15.         
  16.         For j = 1 To 10
  17.             Cells(i, j + 1) = myTable.Rows(1).Cells(j).innerText
  18.         Next
  19.         
  20.         i = i + 1
  21.     Next
  22. End With

  23. Set myXML = Nothing
  24. Set myHTML = Nothing

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

TOP

¦^´_ 9# afu9240

§Y®Éªº³¡¤À¡A§Ú­è­è¸Õ¬OOKªº

±z¹Ï¤ùªº¿ù»~À³¸Ó¬O¦]¬°§Ú¬O¨úA2¨ìA4ªºªÑ²¼¥N¸¹¡A¦ý±z¦n¹³¥u¦³A2¦³­È¡A¤~¾É­P³o­Ó¿ù»~¡A©Ò¥HÀ³¸Ó²³æ§ï¤@¤U°j°é§Y¥i¸Ñ¨M

01§Ú·QÀ³¸Ó¬O«ümobile01§a?
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 8# quickfixer


    ¤£¦n·N«ä01­þÃä¬O«ü??????­þ¨à
yvonne

TOP

¥»©«³Ì«á¥Ñ quickfixer ©ó 2018-5-9 09:03 ½s¿è

.setRequestHeader "Cache-Control", "no-cache"
.setRequestHeader "Pragma", "no-cache"
.setRequestHeader "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"
.send

§ì§Y®É¸ê®Æ,­n§ï¦¨³o¼Ë,01¨ºÃ䦳¤ñ¸û¸Ô²Óªº»¡©ú

TOP

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD