Dim d As Date = #1/1/2014#
Dim t As Table = Tables("供应商资料")
t.Sort ="到货时间"
For i As Integer = 0 To 3
Tables("供应商资料").Position =i
Dim value As Integer
value = Tables("供应商资料.部品明细.纳入计划列表").Compute("sum(数量)","日期 = #" & d & "#")
If value > 0 Then
Dim Book As New XLS.Book(ProjectPath & "Attachments\包装确认.xls")
Dim fl As String = ProjectPath & "Reports\包装确认.xls"
Dim Sheet As XLS.Sheet = Book.Sheets(0)
'sheet(5,6).Value = value
Book.Build()
Book.Save(fl)
Dim Proc As New Process
Proc.File = fl
Proc.Verb = "Print"
Proc.Start()
End If
Next
代码如上, 执行到后边的时候 文本 本来已经保存好了 但是 关闭的时候却提示需要 “保存”!!!!!
循环打印,老弹出对话框 烦死人了。,。。
“该文件 ,就算自己自行打开 也会提示
其他的没问题 ,请会的朋友指导下!!!