Dim dlg As New OpenFileDialog dlg.Filter = "Excel文件|*.xls;*.xlsx" If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮 Dim ip As New Importer ip.format = "Excel" ip.SourcePath = dlg.FileName '指定数据文件 ip.SourceTableName = "sheet1$" '指定要导入的表 ip.NewTableName = "表A" '导入后的表名 ip.Import() End If