代码这样写,路径你改一下
Dim web As New System.Windows.Forms.WebBrowser()
web.Navigate(ProjectPath & "工作量.htm")
Do Until web.ReadyState = 4
Application.DoEvents
Loop
'取数据
Dim Cols() As String = { "病区名称","入院人数","转入人数","转出人数","出院人数","实际病床日","手术床日" }
Dim elems As object = web.Document.GetElementsByTagName("table")(1).GetElementsByTagName("tr")
Dim m As Integer = 0
If elems.count > 1 Then
For j As Integer = 1 To elems.count - 1
Dim tdelems As object = elems(j).GetElementsByTagName("td")
Dim nr As Row = Tables("长江现货").AddNew
For i As Integer = 0 To tdelems.count - 1
nr(Cols(i)) = tdelems(i).Innertext
Next
Next
End If
Tables("长江现货").save