老师我用这个代码做了个事例文件删除重复行可以,项目里面执行只能删除部分呢?
Dim t As Table = Tables("合同管理")
t.Sort = "合同编码,项目名称,合同协议书"
If t.Rows.Count > 1 Then
Dim r As Row = t.Rows(t.Rows.Count - 1)
For i As Integer = t.Rows.Count - 2 To 0 Step -1
Dim r1 As Row = t.Rows(i)
If r("合同编码") = r1("合同编码") And r("项目名称") = r1("项目名称") And r("合同协议书") <> Nothing Then
r1.Delete
Else
r = r1
End If
Next
End If
意思是有重复行时,删除合同协议书不为空的行
[此贴子已经被作者于2018/5/16 19:13:17编辑过]