参考
Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter= "EXCEL文件|*.xls" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
MessageBox.Show("你要导入为:" & dlg.FileName,"提示") '提示用户选择的文件
Dim Book As New XLS.Book(dlg.filename)
Dim Sheet As XLS.Sheet= Book.Sheets(0)
Tables("表A").StopRedraw()
'注意以下数组中列名称的顺序,必须和Excel表中的列顺序一致
Dim nms() As String = {"序号","日期","内容"}
'注意下面的循环变量从1开始,而不是从0开始,因为Excel表的第一行是标题
For n As Integer = 1 To Sheet.Rows.Count -1
Dim dr As DataRow = DataTables("表A").find("内容='" & sheet(1,2).value & "'")
If dr 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