我做了一个excel报表,报表名是“管理费用明细账”,在菜单的excel报表-生成报表下,可以正常打开,为了方便,我在窗口中做了个打印按钮,在click事件中,加入如下代码,
Dim Book As New XLS.Book(ProjectPath & "Attachments\管理费用明细账.xls")
Book.Build()
Book.Save(ProjectPath & "Reports\管理费用明细账.xls")
Dim Proc As New Process
Proc.File = "c:\reports\test.xls"
Proc.Start()
结果按下这个按钮的时候,出现如下错误提示,请问是什么原因?谢谢!
此主题相关图片如下:截图00.png
现在可以了,代码应该是
Dim Book As New XLS.Book(ProjectPath & "Attachments\管理费用明细账.xls")
Dim fl As String = ProjectPath & "Reports\管理费用明细账.xls"
Book.Build()
Book.Save(fl)
Dim Proc As New Process
Proc.File = fl
Proc.Start()
[此贴子已经被作者于2011-12-14 1:27:16编辑过]