取消之前的筛选:
Tables("表A").filter = “”
如果要排序需要增加一个辅助序号列。
……
Next
Dim dict As new Dictionary(of Integer,Integer)
array.sort(ary3, ary1)
Dim str As String = ""
For i As Integer = 1 To c
dict.Add(ary1(i-1),i)
str &= ary1(i-1) & ","
Next
t.filter = "_Identify in (" & str.trim(",") & ")"
For Each r As Row In t.Rows
r("序号") = dict(r("_Identify"))
Next
t.sort = "序号"