Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.Filter= "Excel文件|*.xls" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then
Dim ccb As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1")
Dim ws As String = Tables("人员抽取_人员").getColVisibleWidth
If ccb.Text > "" Then
Dim lst As new List(of String)
lst.AddRange(ccb.Text.Split(","))
For Each c As Col In Tables("人员抽取_人员").Cols
c.Visible = lst.Contains(c.Name)
Next
End If
Dim flg As New SaveExcelFlags
flg.RowNumber = False
flg.CellStyle = True
flg.VisibleOnly = True
Tables("人员抽取_人员").Cols("身份证号").Move(0)
Tables("人员抽取_人员").SaveExcel(dlg.FileName,"人员抽取_人员",flg)
Tables("人员抽取_人员").SetColVisibleWidth(ws)
Dim Proc As New Process
Proc.File = dlg.FileName
Proc.Start()
End If