- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 257
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-28
|
¦^´_ 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 |
|