Tables("表A").StopRedraw()
For Each file As String In filesys .GetFiles("D:\测试")
If file.EndsWith(".xls") OrElse file.EndsWith(".xlsx") Then
Dim Book As New XLS.Book(file)
Dim Sheet As XLS.Sheet = Book.Sheets(0)
'注意以下数组中列名称的顺序,必须和Excel表中的列顺序一致
Dim nms() As String = {"第一列","第二列","第三列"}
'注意下面的循环变量从1开始,而不是从0开始,因为Excel表的第一行是标题
For n As Integer = 1 To Sheet.Rows.Count -1
Dim bh0 As String = sheet(n,0).Text
Dim bh1 As String = sheet(n,1).Text
Dim bh2 As String = sheet(n,2).Text
If DataTables("表A").SQLFind("第一列 = '" & bh0 & "' And 第二列 = '" & bh1 & "' And 第三列 = '" & bh2 & "'") Is Nothing Then '如果不存在同编号的订单
Dim r As Row = Tables("表A").AddNew()
For m As Integer = 0 To nms.Length - 1
r(nms(m)) = Sheet(n,m).Value
Next
End If
Next
Tables("表A").ResumeRedraw()
End If
Next
实际数据很多用了分页加载,如何让它更快?