Dim dlg As New OpenFileDialog '定义一个新的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 = "sheet0" '指定要导入的表
ip.NewTableName = "原始表1" '导入后的表名
ip.Import()
End If
如何用代码判断要导入的电子表是否含sheet0,如存在sheet0则导入,否则退出。