……
vars("总箱数") = cn1
vars("总立方") = cn2
vars("总毛重") = cn3
Dim Sheet As XLS.Sheet = Book.Sheets(0)
dim filter as string = ""
If Tables("packinglist_t").current("boxno") = Nothing
filter = "<BoxNo is null and (customer <> 'CWA' or customer is null)>" '客户不是CWA才打印
Else
filter = "<BoxNo='" & Tables("packinglist_t").current("boxno") & "' and (customer <> 'CWA' or customer is null)>" '客户不是CWA才打印
End If
sheet(5,14).value = filter
……
Book.Save(fl) '保存工作簿
Proc.File = fl
Proc.Start()
End If
DataTables("packinglist_t").ReplaceFor("_locked",true,filter)