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

[µo°Ý] ¦p¦ó¦bºô­¶·j´Mµ²ªG«á¡A¦A«ö­­®É¶¡«ö¶s

[µo°Ý] ¦p¦ó¦bºô­¶·j´Mµ²ªG«á¡A¦A«ö­­®É¶¡«ö¶s

½Ð±Ð¦U¦ì«e½ú­Ì~
¥HVBA¶}±ÒIEºô­¶°µºô¸ô·j´Mªº¤è¦¡¦³«Ü¦h½g´T
§Ú·Q½Ð±Ð¤@¤U¡A
¦pªG¬O·j´M¤§«á¡A·Q­n«ö­¶­±¥ªÃ䪺"¹L¥h1­Ó¤ë"
¦³¿ìªk°µ¨ì¶Ü?
§Ú¥Î«ö¤U"·j´M"ªºµ{¦¡½X(¦p¤U)¨Ó§ï¼g¡A³£¨S¤ÏÀ³~~^^"

IE.document.getElementsByName("btnG").Item.Click

Ãö©óºô¸ô·j´M»P¶×¤Jªº°ÝÃD
¥Ø«eªºµ{¦¡ÀÉ°õ¦æ·|¥X²{¿ù»~
§Úªºª½Ä±¬O¦]¬°µ{¦¡¤¶­±¤w¸g¦bEXCEL¤F¡A¤£ª¾¹D«ç»ò¦A¦^¥h­è­è¥´¶}ªºIE¤~·|¥X²{¿ù»~...
½Ð°Ý¦³«e½ú¥i¥HÀ°¦£¬Ý¬Ý»P­×§ï¶Ü?
·Q­n¥i¥H±±¨îIE¶i¤U¤@­¶ µM«á¶×¤J ¦A¤U¤@­¶ (¦Ü¤Ö5­Ó´`Àô)
¶×¤J¤§«á¤è«K°µ¬ö¿ý»P°Ï¤À


·P®¦

Data.rar (35.13 KB)

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-8-20 09:46 ½s¿è

¦^´_ 2# Michelle-W
google  ·|¦³¬y¶qºÞ¨î­­¨î¸ê®Æªº¤U¸ü
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub ¸ê®Æ·j´M()
  3.     Dim IE As Object, MyState As String, E As Object
  4.     Dim Sh As Worksheet, Msg As Boolean, i As Integer
  5.     With Workbooks.Open(ThisWorkbook.Path & "\¸ê®Æ³B²z.xlsm")  '¥´¶}¥t¤@­Óexcel°µ¬°¸ê®ÆÀx¦s
  6.         Set Sh = .Sheets("SHEET2")
  7.         Sh.Cells.Clear
  8.     End With
  9.     Set IE = CreateObject("InternetExplorer.Application")
  10.     With IE
  11.         .Visible = True 'False
  12.         .Navigate ("https://www.google.com")
  13.     End With
  14.     MyState = ThisWorkbook.Sheets("sheet1").Range("A2") 'B2¬°ÃöÁä¦r,¥´¶}IE
  15.     While IE.Busy Or IE.readyState <> 4:  DoEvents: Wend '½T«Oºô­¶§¹¾ã¥´¶}
  16.     For Each E In IE.Document.getelementsbytagname("input")
  17.         If E.Name = "q" Then: E.Value = MyState: Exit For  '§ä¨ìinput,¶ñ¤J¿é¤J­È
  18.     Next
  19.     While IE.Busy Or IE.readyState <> 4:  DoEvents: Wend '½T«Oºô­¶§¹¾ã¥´¶}
  20.     IE.Document.getElementsByName("btnG").Item.Click '«ö¤U·j´M¯Ã
  21. ag:   '¤U¸ü·j´Mµ²ªG
  22.     Msg = False
  23.     While IE.Busy Or IE.readyState <> 4:  DoEvents: Wend '½T«Oºô­¶§¹¾ã¥´¶}
  24.     'FnWait (0.7)  'µ¥«Ý®É¶¡ :µ¥­Ôºô­¶¾ã²z§¹²¦
  25.     Do While IE.Busy: DoEvents: Loop
  26.     For Each E In IE.Document.ALL.TAGS("H3")
  27.         i = i + 1
  28.         Sh.Cells(Sh.Range("A" & Sh.Rows.Count).End(xlUp).Row + 1, 1) = E.ALL(0).innertext
  29.         Sh.Cells(Sh.Range("B" & Sh.Rows.Count).End(xlUp).Row + 1, 2) = E.ALL(0).HREF
  30.         Application.StatusBar = E.ALL(0).innertext
  31.     Next
  32.     For Each E In IE.Document.ALL.TAGS("span")
  33.         If E.innertext = "¤U¤@­¶" Then
  34.             Msg = True
  35.             E.Click
  36.             Exit For
  37.         End If
  38.     Next
  39.     If Msg Then GoTo ag
  40.     If IE.LocationURL Like "https://ipv4.google.com/sorry/IndexRedirect?*" Then  '** ³Q google  ¬y¶qºÞ¨î
  41.         MsgBox "½Ð¥ý¨ì IE ¿é¤J:ÅçÃҼƦr,¦A¦^¨ìExcel «ö¤U½T©wÁä ", , "google  ¬y¶qºÞ¨î"
  42.         GoTo ag
  43.     End If
  44.     Application.StatusBar = MyState & " ¦@ google " & i
  45.     IE.Quit
  46. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE


¹ï¤£°_!! §Ú­è­è¨S¬Ý¦n¡A½Ð©¿²¤§Ú¤W¤@½gªº¯d¨¥¡A§Ú§R°£¤£±¼¤F><"
§Ú·Q½Ð°Ý¤@¤U°õ¦æªº®É­Ô¡A
·|¥X²{¿ù»~91¡A¦b³o¤@¥y
Sh.Cells(Range("A" & Rows.Count).End(xlUp).Row + 1, 1) = E.ALL(0).innertext
½Ð°Ý±z°õ¦æªº®É­Ô·|¶Ü?
ÁÙ¬O§Ú¤S­þ¸Ì¨S¬Ý²M·¡¤FQQ"""

TOP

¦^´_ 5# Michelle-W
2003¨S¦³¿ù»~
¥i­×¥¿¤@¤U
  1. Sh.Cells(Sh.Range("A" & Sh.Rows.Count).End(xlUp).Row + 1, 1) = E.ALL(0).innertext
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# GBKEE
ÁÙ¬O¥X²{¿ù»~QQ
§ÚºI¹Ï½Ð±zÀ°¦£¬Ý¬Ý
«D±`·PÁ±z!!!

TOP

¦^´_ 6# Michelle-W

3#ªºµ{¦¡½X¦³»~¤w§ó¥¿ ¦]¤Ö¤FWith
  1. With Workbooks.Open(ThisWorkbook.Path & "\¸ê®Æ³B²z.xlsm")  '¥´¶}¥t¤@­Óexcel°µ¬°¸ê®ÆÀx¦s
  2.     Set Sh = .Sheets("SHEET1")
  3.     Sh.Cells.Clear
  4. End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-8-19 07:39 ½s¿è

¦^´_ 7# GBKEE
§Ú§â¹Lµ{¥Î¹Ï¥Ü¨Óªí¹F¡G

«ö½T©w«á¡AÀH§Y¶i¤J¦p¤U (424) µe­±

Ä@§Ú¤µ¤é²´·ú¤â³N¶¶§Q¡B¦¨¥\¡I

TOP

¦^´_ 7# GBKEE
¶¶¤â±NÀÉ®×Âন .xls ¤è«K´ú¸Õ¡C
Data(xls).rar (56.59 KB)

TOP

¦^´_ 9# c_c_lai
§ó·s3#ªºµ{¦¡½X
2003ª© °õ¦æ¦p¤U¹Ï


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

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD