删除的参考代码
Dim t As Table = Tables("表A")
t.Select(t.Rowsel,t.cols("第一列").Index)
syscmd.Filter.ShowRedundantValues
For i As Integer = t.Rows.Count -1 To 0 Step -1
t.rows(i).Delete
Next
t.Datable.Save
t.filter = ""
或者正常的删除
Dim i As Integer
For i = DataTables("表A").DataRows.Count-1 To 0 Step -1
Dim dr As DataRow = DataTables("表A").DataRows(i)
Dim dr2 As DataRow = DataTables("表A").Find("第一列='" & dr("第一列") & "' and 第二列='" & dr("第二列") & "' and _Identify <> " & dr("_Identify"))
If dr2 IsNot Nothing Then
dr2.Delete
End If
Next