Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog dlg.Filter= "Excel文件|*.xls" '设置筛选器 If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮 Dim ex As New Exporter ex.Format = "Excel" ex.SourceTableName = "产品" '指定导出表 ex.Filter=Tables("产品").Filter ex.filepath = dlg.FileName '指定目标文件 ex.Export() '开始导出 End If