Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog dlg.Filter= "Excel文件(*.xlsx;*.xls)|*.xlsx;*.xls" '设置筛选器 If dlg.ShowDialog = DialogResult.Ok Then For Each t As Table In Tables Tables(t.name).SaveExcel(dlg.FileName, t.name) Next MessageBox.Show("导出完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If