Dim dlg As new OpenFileDialog If dlg.ShowDialog = DialogResult.OK Then If Connections.Contains("test") Then Connections.Delete("test") Connections.Add("test","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dlg.FileName & ";Persist Security Info=False") For Each tn As String In Connections("test").GetTableNames Dim ip As New Importer ip.SourcePath = dlg.FileName '指定数据文件 ip.SourceTableName = tn '指定要导入的表 ip.NewTableName =tn '导入后的表名 ip.Import() Next End If