- ©«¤l
- 759
- ¥DÃD
- 249
- ºëµØ
- 0
- ¿n¤À
- 1021
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 11
- ³nÅ骩¥»
- OFFICE2021
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-5-30
- ³Ì«áµn¿ý
- 2024-11-12
|
¥»©«³Ì«á¥Ñ t8899 ©ó 2015-4-5 21:25 ½s¿è
¥H¤U¬O¥Î XMLHTTP §ì¥X¨Óªº¤º®e
¥i¥H¬Ý¨ì¦³Äæ¦ì¦WºÙ, ¦ý§ì¤£¨ì¼ÆÈ
¨ºÓºô¶ªº¼ÆȬO¥Î javascript ¨Æ«á¸É ...
bobomi µoªí©ó 2015-4-5 20:39
³oºØ5¬í5¬í¤@ª½§ó·s¡A¥u¦³javascript ¤~°µªº¨ì??
¥ÎIE §ì¸ê®Æ¡A³t«×¤ÓºC........¤Ó®øÏä¸ê·½...............¦A§ä¬Ý¬Ý¦³µL¨ä¥Lªk!
§Ú¥Ø«e¬O¥ÎGBKEE¥S¼gªº,µy·L°µ³¡¥÷קï¦p¤U
Set Ie = CreateObject("InternetExplorer.Application")
Ie.Navigate "http://mis.twse.com.tw/stock/group.jsp?ex=tse&ind=TIDX#STATISTICS"
Dim timeie
timeie = DateAdd("s", 10, Now())
Do While Ie.Busy Or Ie.ReadyState <> 4
DoEvents
If timeie < Now() Then
MsgBoxTest 0, "µLªk³s±µºô¯¸,½Ð«·s°õ¦æ", "´£¥Ü°T®§", vbSystemModal, 0, 2000
Ie.Quit
Exit Sub
End If
Loop
-----------------------------------------------------------------------------
Dim i As Integer, S As Integer, k As Integer, j As Integer
Dim Element
Set Element = Ie.document.getelementsbytagname("table")
With Sheets("sheet5")
' .Range("C1:C17").ClearContents
For S = 2 To 3 '¤w§ä¥Xºô¶ªºtable¤º®e¦b 0-3 ¤¤
For i = 0 To Element(S).Rows.Length - 1
k = k + 1
' For j = 0 To Element(S).Rows(i).Cells.Length - 1 '¸ê®ÆªºÄæ¦ì¦@6¦ì
j = 2
.Cells(k, j + 1) = Element(S).Rows(i).Cells(j).innerText
' Next
Next
Next
End With
Set Element = Nothing |
|