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