- ©«¤l
- 161
- ¥DÃD
- 26
- ºëµØ
- 0
- ¿n¤À
- 187
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2011-1-2
- ³Ì«áµn¿ý
- 2022-2-16
|
§ï³o¼Ë¥i¦æ¡A¦ý¬°¤°»ò²Ä¤G¦¸°õ¦æ·|¿ù»~- Sub Ex()
- Dim i As Integer, s As Integer, k As Integer, A, ii, j
- Dim co_id As String, isnew As String, season As String
- '²Ä¤@©u 01,²Ä¤G©u 02²Ä¤T©u 03,²Ä¥|©u 04.
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate "https://www.cnyes.com/twstock/ps_historyprice/1216.htm"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
- With .document
- For Each A In .getElementsByTagName("INPUT")
- If A.Name = "ctl00$ContentPlaceHolder1$startText" Then A.Value = Format(Now - 1500, "yyyy/mm/dd") '"2016/06/01"
- Next
- For Each A In .getElementsByTagName("INPUT")
- If A.Name = "ctl00$ContentPlaceHolder1$endText" Then A.Value = Format(Now, "yyyy/mm/dd") '"2019/07/27"
- Next
- For Each A In .getElementsByTagName("INPUT")
- If Trim(A.Value) = "¬d¸ß" And A.Name = "ctl00$ContentPlaceHolder1$submitBut" Then A.Click '«ö¤U[¬d¸ß]Áä
- Next
- End With
- ' On Error Resume Next '***¦³¨Çtable¨SRows¸ê®Æ·|²£¥Í¿ù»~ ¤£²z·|¥¦,µ{¦¡Ä~Äò¨«
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
-
- Set A = .document.getElementsByTagName("table")(0)
- ' On Error Resume Next
- With ActiveSheet
- .Cells.Clear
- For i = 0 To A.Rows.Length - 1
- For j = 0 To A.Rows(i).Cells.Length - 1
- .Cells(i + 1, j + 1) = A.Rows(i).Cells(j).innerText
- Debug.Print i
- Next
- Next
- End With
- .Quit 'Ãö³¬ºô¶
- End With
- End Sub
- 'vba ¾Þ§@ie¶×¤J¸ê®Æ 'http://forum.twbts.com/viewthread.php?tid=9511
- '¦p¦ó¦bºô¶·j´Mµ²ªG«á¡A¦A«ö®É¶¡«ö¶s
- 'ºô¶µn¤J-«ö¶s°ÝÃD
- '<div class="mbx bd3" enableviewstate="false">
- '<h3 class="tabName"><span id="ctl00_ContentPlaceHolder1_titleLab">²Î¤@ ¾ú¥v¦æ±¡</span></h3>
- '<div class="blank10" enableviewstate="false"></div>
- '<span class="srchyear2" >
- '¶}©l¤é´Á<input name="ctl00$ContentPlaceHolder1$startText" type="text" value="2016/06/01" maxlength="10" id="ctl00_ContentPlaceHolder1_startText" style="width:72px;" />
- 'µ²§ô¤é´Á<input name="ctl00$ContentPlaceHolder1$endText" type="text" value="2019/07/27" maxlength="10" id="ctl00_ContentPlaceHolder1_endText" style="width:72px;" />
- '<input type="submit" name="ctl00$ContentPlaceHolder1$submitBut" value="¬d¸ß" id="ctl00_ContentPlaceHolder1_submitBut" class="butn btnga" />
- ' <span style="float:right">
- '</span>
- '</span>
½Æ»s¥N½X ¦^´_ 1# wufonna |
-
-
Book12.zip
(91.57 KB)
|