For Each r As Row In Tables("xsdhz.xsdmx").Rows
If r.Isnull("xssl") Or r.Isnull("ssj") Then
MessageBox.show("单据明细部分为空,不能打印!")
Return
End If
Next
Dim Book As New XLS.Book(ProjectPath & "Attachments\xsd1.xls")
Dim fl As String = ProjectPath & "Reports\xsd1.xls"
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = fl
Proc.Verb = "Print" '指定动作
Proc.Start()
[此贴子已经被作者于2013-5-9 6:48:07编辑过]