Private Sub Command1_Click()
Dim vDoc, vTag, coll
Dim i As Integer
Dim j As Integer
Set vDoc = ie.Document
Dim mstrcell As String
Set coll = vDoc.All("19")
For i = 0 To coll.rows.length - 1
For j = 0 To coll.rows(i).cells.length - 1
mstrcell = mstrcell & Space(4) & coll.rows(i).cells(j).innertext
Next j
Debug.Print mstrcell
mstrcell = ""
Next i
End Sub
Private Sub Form_Load()
ie.Navigate "E:\1.htm"
End Sub
htm内容
Heading 1Heading 2
Row 1, Column 1 text.Row 1, Column 2 text.Row 2, Column 1 text.Row 2, Column 2 text.