我在命令窗口中试验了一段典型的用模板创建Excel报表的代码(注释掉的是帮助文件中粘贴来的):
Dim Book As New XLS.Book(ProjectPath & "Attachments\项目开发费用大类分类统计01.xls")
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Sheet(3,3).Value = "项目名称:"
Book.Build()
Dim fl As String = ProjectPath & "Reports\BBB.xls"
Book.Save(fl)
Dim Proc As New Process '打开工作簿
Proc.File = fl
Proc.Start()
'Dim Book As New XLS.Book(ProjectPath & "Attachments\出库单.xls") '打开模板
'Dim Sheet As XLS.Sheet = Book.Sheets(0)
'Sheet(6,6).Value = "制单人:" & User.Name '修改模板,加入制单人信息
'Book.Build() '生成细节区
'Book.Save("c:\reports\test.xls") '保存工作簿
'Dim Proc As New Process '打开工作簿
'Proc.File = "c:\reports\test.xls"
'Proc.Start()
执行代码后报错,不执行!报错内容如插图,请问问题出在哪里?