那就应该在导入的时候,限制不要导入重复数据,比如:http://www.foxtable.com/webhelp/scr/2334.htm
事后处理麻烦不说,效率也很低。
Tables("表A").Sort = "第一列,第二列,第三列,第四列,第五列"
Dim fr As Row = Tables("表A").Rows(Tables("表A").Rows.Count - 1)
For i As Integer = Tables("表A").Rows.Count - 2 To 0 Step -1
Dim f As Boolean
Dim r As Row = Tables("表A").Rows(i)
For Each c As Col In Tables("表A").Cols
If c.Name <> "入库时间" Then
If fr(c.Name) <> r(c.Name) Then
f = True
Exit
End If
End If
Next
If f = False Then
r.delete
Else
fr = r
End If
Next
[此贴子已经被作者于2018/10/26 17:16:30编辑过]