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

[µo°Ý] ¦p¦ó±N±qEXCEL¤ºªº¸ê®Æ¶K¤Jºô¯¸¤¤(¹Lµ{³£¥ÑVBA¦Û°Ê°õ¦æ)

¥»©«³Ì«á¥Ñ icestormer ©ó 2013-10-19 21:26 ½s¿è

Sub Test()
  Dim oIe, myData As DataObject, x
  
  Set myData = New DataObject  '»Ý¤Þ¥Î MS Form Object Library
  
  With Sheets("°ÝÃD")
    .Range(.[A4], .[F4].End(xlDown)).Copy
  End With
  myData.GetFromClipboard
  
  Set oIe = CreateObject("internetExplorer.Application")
  With oIe
    '.Visible = False
    .navigate "http://www.evepraisal.com"
    Do While oIe.readystate <> 4: DoEvents: Loop
   
    .document.getElementById("raw_textarea").innerText = myData.GetText '¶ñ¤J
    .document.getElementById("result_submit").Click 'submit
   
    Application.Wait Now + TimeValue("00:00:05")  'µ¥«Ý5¬í§¹¦¨
   
    Set x = .document.getElementById("result_container")
  MsgBox x.All.tags("h4")(0).innerText

½Ð°Ý¤@¤U MSGBOX³o¦æ ¦pªG­n§âµ²ªG¼g¤J L22®æ¤º ­n«ç¼g ©O?(¤£­nÅã¥Ü¦bMSGBOX¤W) ·PÁÂ

    .Quit
  End With
  
End Sub

TOP

¦^´_ 11# icestormer
  1.       '  MsgBox x.All.tags("h4")(0).innerText
  2.       [L22] = x.All.tags("h4")(0).innerText
½Æ»s¥N½X

TOP

¦^´_ 12# c_c_lai


   °ÝÃD³£¸Ñ¨M¤F ·PÁ¦U¦ì!

TOP

¦^´_ 2# stillfish00


    Dear S ¤j

§Ú·Q½Ð°Ý  Ãö©óºô­¶ª«¥óªº³o­Ó¼gªk¸Ì­±

.document.getElementById("raw_textarea").innerText = myData.GetText '¶ñ¤J
    .document.getElementById("result_submit").Click 'submit

³o¨â¦æ¦rªº¸ÑÄÀ¡AÀ³¸Ó­n¥hmsdnªº­þ¸Ì¬d¸ß  ©Î¬O±q­þ­Óª«¥ó¥h¤F¸Ñ

§Ú±`±`¬Ý¨ì§A­Ì»PG¤j&H¤j ³£¯à°÷¹B¥Î¦Û¦p

§ÚÁÙ¦b¾Ç²ßªº¹Lµ{·í¤¤¡Aµo²{¬d§ä¸ê®Æ¬O³ÌÃøªº¤@Àô¡A³Ñ¤U¨ÓªºÀ³¥Î¡A¬Ý½d¨ÒÀ³¸Ó³£¯à²¤ª¾¤@¤G ºCºC²z¸Ñ

½Ð°Ý³o­Ó³¡¤À °²³]§Ú¬O·s¤â¡A·Q­n¤F¸Ñºô­¶ª«¥ó¥Îªk¡AÀ³¸Ó±q­þ­Ó¦a¤è¤Á¤J

ÁÂÁ±zªº«ü±Ð^^

TOP

Sub Test()
  Dim oIe, myData As DataObject, x
  
  Set myData = New DataObject  '»Ý¤Þ¥Î MS Form Object Library
  
  With Sheets("°ÝÃD")
    .Range(.[A4], .[F4].End(xlDown)).Copy
  End With
  myData.GetFromClipboard
  
  Set oIe = CreateObject("internetExplorer.Application")
  With oIe
    '.Visible = False
    .navigate "http://www.evepraisal.com"
    Do While oIe.readystate <> 4: DoEvents: Loop
   
    .document.getElementById("raw_textarea").innerText = myData.GetText '¶ñ¤J
    .document.getElementById("result_submit").Click 'submit
   
    Application.Wait Now + TimeValue("00:00:05")  'µ¥«Ý5¬í§¹¦¨
   
    Set x = .document.getElementById("result_container")


¦pªG·Q¤À§O®»¨ú¬õ°é³B亖­Ó 1 total sell value  2 total buy value   3 total volume   ¤À§O¦s¤J L22 L23 L24 ®æ¤¤[/size]''

½Ð°Ý­n«ç§ï©O? ·PÁÂ~




    MsgBox x.All.tags("h4")(0).innerText
    .Quit
  End With
  
End Sub

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-10-21 16:50 ½s¿è

¦^´_ 14# handsometrowa
http://www.w3school.com.cn/html/index.asp ¥i¥H¥ý¬Ý¤@¤U HTML ªº¤¸¯À¡B¼ÐÅÒ¡BÄÝ©Ê
http://www.w3school.com.cn/htmldom/index.asp ¦A¬Ý¬Ý¸`ÂI¡B³X°Ý¤èªk(³o¬OÂkÃþ¦bjavascript¤Uªº¡A¦ý³£¤j¦P¤p²§)

µM«á¤ñ¹ï¬Ý¹Lªº½d¨Ò¡A¦A¹ï·Ó­ì©l½X¥i¯à·|¤ñ¸û¦³¦¬Ã¬¡A¨ä¹ê´N¬O¦b¾ð¤¤®Ú¾Ú¯S©wÄݩʧä¸`ÂI¡C

TOP

¦^´_ 15# icestormer
  1.     Set x = .document.getElementById("results").tFoot.all.tags("span")
  2.     [L22].Value = x(0).innerText & " : " & x(3).innerText
  3.     [L23].Value = x(1).innerText & " : " & x(4).innerText
  4.     [L24].Value = x(2).innerText & " : " & x(5).innerText
½Æ»s¥N½X

TOP

¦^´_ 14# handsometrowa
·j´M   CreateObject("InternetExplorer.APPLICATION") ©Î getElementById   ·|¦³µª®×ªº
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 18# GBKEE
¦^´_ 16# stillfish00

¥ý·PÁ¨â¦ì«e½ú¦^ÂЧڪº°ÝÃD¡A(ÃD¥~¸Ü¡A½Ð°Ý«ç»ò¤@¤f®ð¦^´_¨â­Ó¤Hªü¡A§Ú¬O¥Î½Æ»s¶K¤W¨C¦¸ªº¦^Âгsµ²ªº@@")

¬Q¤Ñ¬d§ä¤F¤@¤Ñ¡A¦³ÂI°µ¥Õ¤uªº·Pı¡A¦n¹³µLÀY»aÃÇ  ¨S¦³·Q¨ìG¤j¸ò§ÚÁ¿ªºÃöÁä¦r §Ú³æ¯Â·j´M´N¦n¡A
(¬Q¤é¥ÎGOOGLE ÂsÄý¾¹ ¥´¤W¤FDocument.getElementsByName    ¶]¨ì­ì¤åºô¯¸¥h¡A«ç»ò¬Ý«ç»ò¤£¸Ñ°_¦]µ²ªG)

¤µ¤Ñ±oª¾¨â¦ì¡A¤Wºôª¦¤F¤@¤U¤å³¹¡AÂà¸ü¤@¤Uºô§} ¡A§Æ±æµ¹¦U¦ì¤À¨É
­ì¨Óºô¯¸¬O¥Ñ¨C­Ó¤¸¯Àºc¦¨ªº¡A¨C­Ó¤¸¯À³£¦³¦Û¤vªºID¥B¤£­«½Æ¡A(¦ý¬O³o­ÓIDÁÙ¥i¥H¤£¦s¦b....)
Ãø©ÇG¤j¨C¦¸¦b§ìºô¯¸¸ê®Æªº®É­Ô¡A­n§Q¥ÎÃþ¦ü°}¦C¤¸¯À¤@­Ó¤@­Ó§ì
¥H¤Uªººô§}  Âà¸ü¤F2006¦~ªº¨k¤B®æº¸ºô¯¸
http://blog.xuite.net/abgne/diary1/5896789#message_header
ªºÂ²³æ¸ÑÄÀ¡A¬Ý¤F¤@¤U¡Aµy¯à²¤ª¾¤@¤G

­ì©lªºgetElementsByName  
§Ú¥ý§ä¨ì­Óºô¯¸http://blog.longwin.com.tw/2007/08/javascript_set_id_style_method_2007/
GetID ³o­Ó¥Îªk»Pstillfish00¦b16¼Ó¦^§Úªº¨Ì¼Ë¡A¬O¬[³]¦bJAVA µ{¦¡»y¨¥¸Ì­±ªº
¨S¦³·Q¨ì¡A¸I­ÓVBA¡A³s¨ä¥L³nÅé³£­n²¤ª¾¤@¤G¤F

¥H¤W¥ý¸ò¦U¦ì¤À¨É¡A§ÚºCºC¦A¬d§ä¸ê®Æ¡C

TOP

¦^´_ 17# stillfish00


   ·PÁ §A¤Î¤j®aªºÀ°¦£!

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD