就是呀 很奇怪
DataTables(Vars("台账名")).LoadFilter = "台账编号='" & e.Table.Current("台账编号") & "'"
DataTables(Vars("台账名")).Load
Dim ps As System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("Excel")
For Each p As System.Diagnostics.Process In ps
p.kill
Next
Dim Book As New XLS.Book(ProjectPath & "Attachments\" & Vars("台账名") & ".xls")
Dim fl As String = ProjectPath & "Reports\" & Vars("台账名") & ".xls"
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
If ShowAppWindow(Vars("台账名"),5) = False Then
msgbox("打开")
Dim wbr As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
wbr.AddRess = ""
wbr.AddRess = fl
End If
这样也弹错,我看着进程关闭的
改成下面的也弹错
Dim Book As New XLS.Book(ProjectPath & "Attachments\" & Vars("台账名") & ".xls")
Dim fl As String = ProjectPath & "Reports\" & Vars("台账名") & ".xls"
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim ps As System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("Excel")
For Each p As System.Diagnostics.Process In ps
p.kill
Next
If ShowAppWindow(Vars("台账名"),5) = False Then
msgbox("打开")
Dim wbr As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
wbr.AddRess = ""
wbr.AddRess = fl
End If
[此贴子已经被作者于2014-8-22 16:45:06编辑过]