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

[¤À¨É] (¤w¸Ñ¨M)½Ð°Ý±Nºô§}¥ÎWORD¶}±Ò«á¡AÀ³¦p¦ó¼g¥¨¶°½Æ»s¨ìEXCELªí®æ¤¤©O!?

[¤À¨É] (¤w¸Ñ¨M)½Ð°Ý±Nºô§}¥ÎWORD¶}±Ò«á¡AÀ³¦p¦ó¼g¥¨¶°½Æ»s¨ìEXCELªí®æ¤¤©O!?

¥»©«³Ì«á¥Ñ fusayloveme ©ó 2012-2-21 15:59 ½s¿è

¤p§Ì¤@¶}©l¹Á¸Õ§Q¥Î¥¨¶°¿ý»s¡Aµo²{¦n¹³¥¨¶°¤£ºÞ§Ú¬O§_¦³¶}±ÒWORD¡A©Ò¥H¦³¨Ç°ÝÃD·Q½Ð±Ðª©¤W¤j¤j

¤@¶}©l§Q¥ÎEXCEL«Ø¥ß»Ý­n¶}±Òªººô§}«á¡A½Æ»s¨ìWORD¶}±Ò«á¡A


¤j·§´N¹³Ãþ¦ü¥H¤Wªºµe­±¡A"¶K¤Wªº¦ì¸m"¬O«ü§Ú¦bWORD½Æ»s«á¡A­n¶K¤Wªº©Ò¦bÄæ¦ì¡A
±µ¤U¨Ó¡A§Ú»Ý­n±N³¡¤À¤å¦r°µ¤@­Ó"Âà¸mªº°Ê§@"¡AµM«á¦b¦æ¶K¤W§ÚªºÄæ¦ì¡A¤£¹L¥Ñ©ó¸ê®ÆÃe¤j¡A
¤£¾å±oª©¤W¤j¤j¬O§_¦³§ó¦nªº¿ìªk¡A¤p§Ì·P¿E¤£ºÉ!! ÁÂÁÂ
ªþ¤WEXCELÀÉ
·PÁÂ!!
¯óºØ_¸Õ¸Õ¬Ý.rar (127.71 KB)

¦^´_ 1# fusayloveme
²Ä¤G¦C¼ÐÃD¤w¥ý¿é¤J
  1. Sub nn()
  2. Dim MyIE As InternetExplorer, MyDoc As HTMLDocument
  3. Set MyIE = CreateObject("InternetExplorer.application")
  4. Set d = CreateObject("Scripting.Dictionary")
  5. With MyIE
  6. .Visible = True
  7. r = 3
  8. For i = 1 To 1044
  9. .navigate "http://www.tbs-aqua.com/encyclopaedia/plant?plantID=" & i
  10. Do Until .readyState = READYSTATE_COMPLETE: Loop
  11. Set MyDoc = .document
  12.    With MyDoc
  13.      Set x = .getElementsByTagName("Table")
  14.      For j = 0 To x(9).Cells.Length - 1 Step 2
  15.      n = Replace(Replace(x(9).Cells(j).innerText, "¡G", ""), " ", "")
  16.         d(n) = x(9).Cells(j + 1).innerText
  17.      Next
  18.      d("©Êª¬") = x(10).innerText
  19.    End With
  20.    With Sheet1
  21.      .Cells(r, 1) = i
  22.      For k = 2 To 11
  23.      n = .Cells(2, k).Value
  24.        .Cells(r, k) = d(n)
  25.      Next
  26.      r = r + 1
  27.     End With
  28.      d.RemoveAll
  29. Next
  30. .Quit
  31. End With
  32. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

¤£¦n·N«ä,Hsieh¤j¤j,¹Á¸Õ±N±zªº¥N½X¥N¤J«á¡Aµo²{"¨Ï¥ÎªÌ¦Û­q«¬ºA©|¥¼©w¸q"¡A²Ä¤@¦¸¸I¨ì¦p¦¹±¡§Î¡A½Ð°Ý¸Ó¦p¦ó¸Ñ¨M©O?

¥t¥~·Q½Ð°Ý¤j¤j¡A¥Ñ©óºô¯¸¤£¯à½Æ»s¡A©Ò¥H§Ú»Ý­n±Nºô§}¶K¦bWORD"¶}±ÒÂÂÀÉ"ªº¸ô®|¤¤¡A¥ÑWORD¶}±Ò¡A

¦ý§Ú¬Ý¤F¤@¤U¥N½X¦ü¥G¦n¹³ÁÙ¬O¥HIE¬°¥D¡A½Ð°Ý§Ú¯à°÷§ï¦¨ MyIE As Microsoft Office Word 2007 ¶Ü?

¦ý¥Ñ©ó¬O¥²¶·±q WORD¤¤ªº¶}±ÒÂÂÀɤ¤¶}±Ò¡A·Q½Ð°Ý¤j¤j¡A³o¼Ë¬O§_¯à°÷¦æªº³q©O!? ·P¿E¤£ºÉ!!

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-2-21 23:20 ½s¿è

¦^´_ 3# fusayloveme
§Ñ°O´£¿ô­n³]©w¤Þ¥Î¶µ¥Ø
Microsoft HTML Object Library
Microsoft Internet Controls

µ{¦¡¬Oª½±µ¶}±Ò¨C­Ó´Óª«¤¶²Ðºô­¶
µM«áÂ^¨ú¨ä¤¤»Ý­nªºªí®æ¸ê®Æ
¤£¶·¸g¹L¨ä¥Lµ{¦¡Âà¸ü
­«ÂI¦b©ó¼ÐÃD­n¥ý¿é¤J¦n
µM«á·|¨Ì·Ó´Óª«½s¸¹¥Ñ1¶}©l¤U¸ü¸ê®Æ¶ñ¤J¤u§@ªí
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh

¯u¬O¤Ó·PÁÂHsieh¤j¤F¡A¥i¥H¨Ï¥Î¡A¦ý§Ú·Q½Ð±Ð¤@¤U¡AÆ[¹î¤@¤U¥N½X¡A¦ü¥G¬O¤£»Ý­n«ü©w HTMLDocument ¸Ì­±ªº¬ÛÃö¦ì¸m¡A

¤Ï¦Ó¦n¹³¬Oª½±µ«ü©wEXCEL¤¤ªºÄæ¦ì¡A§Ú·Q°Ý¤@¤U¡A³o¦p¦ó¿ì¨ìªº!? ·P¿E¤£ºÉ! ¸U¤À·PÁÂ!!

TOP

¦^´_ 5# fusayloveme


    Sub nn()
Dim MyIE As InternetExplorer, MyDoc As HTMLDocument
Set MyIE = CreateObject("InternetExplorer.application")
Set d = CreateObject("Scripting.Dictionary")
With MyIE
.Visible = True
r = 3
For i = 1 To 1044
.navigate "http://www.tbs-aqua.com/encyclopaedia/plant?plantID=" & i  'ºô§}
Do Until .readyState = READYSTATE_COMPLETE: Loop  'ª½¨ìºô­¶¤U¸ü§¹¦¨
Set MyDoc = .document  '³]©wºô­¶¤¤ªº¤å¥óµ¹ÅܼÆ
   With MyDoc  'ºô­¶¤¤ªº¤å¥ó±Ô­z°Ï¬q
     Set x = .getElementsByTagName("Table")  '¨ú±o¤å¥ó¤¤©Ò¦³ªí®æ
     For j = 0 To x(9).Cells.Length - 1 Step 2  '¦b²Ä10­Óªí®æ¤¤©Ò¦³®æ¤l°µ°j°é¡A¤@¦¸¸õ2®æ
     n = Replace(Replace(x(9).Cells(j).innerText, "¡G", ""), " ", "")  '¨ú©_¼Æ®æªº¤º®e¥h«_¸¹»PªÅ®æ
        d(n) = x(9).Cells(j + 1).innerText  '¥H©_¼Æ®æ¤º¤å¦r°µ¯Á¤Þ¬ö¿ý°¸¼Æ®æªº¤º®e
     Next
     d("©Êª¬") = x(10).innerText  '²Ä11­Óªí®æ¤º®e¬°©Êª¬
   End With
   With Sheet1
     .Cells(r, 1) = i  'AÄæ¼g¤J½s¸¹
     For k = 2 To 11
     n = .Cells(2, k).Value  '±qBÄæ¶}©l¼g¤J¹ïÀ³ªº¤º®e
       .Cells(r, k) = d(n)
     Next
     r = r + 1
    End With
     d.RemoveAll   '²¾°£¦r¨åª«¥ó¤º®e
Next
.Quit  'Ãö³¬IEÂsÄý¾¹
End With
End Sub
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh

·PÁÂ~¤@¥Ø¤FµM¡A¸U¤À·PÁÂHsieh¤j¤jªº«ü¾É ^_^

TOP

¦^´_ 6# Hsieh

Hsieh¤j¡A±z¦n¡A§Q¥Î¤é«e±z±Ð§Úªº¤èªk¹Á¸Õ¥h§ì¥Xºô­¶¤Wªº¤º®e¡A¦ýµo²{­Y¬O¹³¬O¹q¤l³ø¦¹Ãþªº®æ¦¡¡A
¸û¤Ö¬ÛÃö©w¸qªí®æ¡A­Y§Ú·Q±N¹q¤l³øªº¤º®e¡A¨Ì·Ó§Ú·Q­n¤j¼ÐÃDÂ^¨ú¡A½Ð°Ý¤ñ¸û¦nªº°µªk¬O? ·P¿E¤£ºÉ!

ªþ¥ó¤º®e®æ¦¡·|¦A¨Ì·Ó©Ò»Ý¤º®e¶i¦æ§R´î¡A¥D­n¬O¥ý±N¥D­nªº¤º®e¤À§OºK¥X¡A¥H§Q¶i¦æ½s¿è¡A·P¿E!

¨a®`.rar (12.93 KB)

TOP

¦^´_ 8# fusayloveme


    Â^¨úºô­¶¤º®e¡A¥²¶·¬Ýºô­¶ªºµ²ºc
¤£¦Pºô­¶¦³¤£¦P¤èªk¡A¨Ã«D©Ò¦³ºô­¶³£¯à³o¼Ë®e©öÂ^¨ú¸ê®Æ
ªp¥B¹ï©óºôºÞ¸ûÄYªººô¯¸¡A³o¼Ëªº§@ªk¥i¯à³Q»{¬°¬O¬å¯¸³nÅé¦Ó³Q«ÊÂê
¡A½Ðªþ¤Wºô§}¥H§Q´ú¸Õ
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh

http://toxiceric.epa.gov.tw/edm/oldepaper.aspx
Àô¹Ò¬r¨a²°T¹q¤l³øºô¯¸~·P¿E¤£ºÉ!

TOP

        ÀR«ä¦Û¦b : ¡i¦æµ½­n¤Î®É¡j¦æµ½­n¤Î®É¡A¥\¼w­n«ùÄò¡C¦p¿N¶}¤ô¤@¯ë¡A¥¼¿N¶}¤§«e¤d¸U¤£­n°±º¶¤õ­Ô¡A§_«h­«¨Ó´N¤Ó¶O¨Æ¤F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD