- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# hsueh0926
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex() '¤èªk¤@ ¯Â¤å¦r
- Dim Sh As Worksheet, i As Integer, k As Integer, R As Variant
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate "http://norway.twsthr.info/StockHolders.aspx?stock=2454"
- '¸ê®Æ¦b .Document.all.Tags("table")(9)
- Set Sh = ActiveSheet
- Sh.UsedRange.Clear
- Application.StatusBar = "µ¥Ôºô¶¤¤..."
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- Application.StatusBar = "ºô¶¤U¸ü§¹²¦...."
- Application.ScreenUpdating = False
- For Each R In .Document.all.Tags("table")(9).Rows
- k = k + 1
- For i = 0 To R.Cells.Length - 1
- Sh.Cells(k, i + 1) = R.Cells(i).innerText
- Next
- Next
- Sh.UsedRange.SpecialCells(xlCellTypeBlanks).Delete
- Application.ScreenUpdating = True
- .Quit
- End With
- End Sub
½Æ»s¥N½X- Sub Ex2() '¤èªk¤G ºô¶®æ¦¡
- With CreateObject("InternetExplorer.Application")
- ' .Visible = True
- .Navigate "http://norway.twsthr.info/StockHolders.aspx?stock=2454"
- Application.StatusBar = "µ¥Ôºô¶¤¤..."
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- Application.ScreenUpdating = False
- Ep .Document.all.Tags("table")(9).outerHTML
- Application.StatusBar = "ºô¶¤U¸ü§¹²¦...."
- Application.ScreenUpdating = True
- .Quit
- End With
- End Sub
- Sub Ep(S As String)
- Dim Sh As Worksheet
- With CreateObject("InternetExplorer.Application")
- .Navigate "about:Tabs"
- ' .Visible = True
- .Document.body.innerHTML = S
- .ExecWB 17, 2 ' Select All
- .ExecWB 12, 2 ' Copy selection
- Set Sh = ActiveSheet
- With Sh
- .Range("A1").Select
- .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=False
- End With
- .Quit
- End With
- End Sub
½Æ»s¥N½X |
|