添加后代码不对,请优化一下
Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter= "Excel文件|*.xls" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim Book As New XLS.Book(ProjectPath & "Attachments\报表1.xls")
'Tables("检查").SaveExcel(dlg.FileName, "检查") '保存文件
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Sheet(3,9).Value = "<" & Tables("检查").Filter & ">" '写入打印条件
Book.Build() '生成细节区
'Book.Save(dlg) '保存工作簿
If MessageBox.Show("导出数据成功,是否打开数据?","确认",MessageBoxButtons.OKCancel,MessageBoxIcon.Question) =DialogResult.OK Then
'Dim Proc As New Process
'Proc.File = dlg
'Proc.Start()
Else
Syscmd.Table.ToggleSortAndFilter()
e.Form().Close
End If
End If