向甜甜学习!加上StringBuilder可大大提高效率:
Dim web As New System.Windows.Forms.WebBrowser()
web.Navigate(ProjectPath & "aa.htm" )
Do Until web.ReadyState = 4
Application.DoEvents
Loop
Dim sb3 As new StringBuilder
Dim s1 As String
Dim elem As object = web.Document.body.GetElementsByTagName("strong")(0)
output.show("表头:" & elem.Innertext)
Dim elems As object = web.Document.body.GetElementsByTagName("table")
Dim trs As object = elems(2).GetElementsByTagName("tr")
Dim tds As Object
For i As Integer = 0 To trs.count - 1
sb3.AppendLine(vbcrlf )
tds = trs(i).GetElementsByTagName("td")
For c As Integer = 0 To tds.count - 1
s1=tds(c).InnerText
If s1 IsNot Nothing Then s1=s1.trim
If c =0 Then
sb3.Append(s1)
Else
sb3.Append("@" & s1)
End If
Next
Next
If sb3.Tostring IsNot Nothing Then
Output.show(sb3.Tostring)
End If