Dim Book As New XLS.Book(ProjectPath & "Attachments\EDI.xls")
Dim fl As String = ProjectPath & "Reports\EDI.xls"
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(ProjectPath & "Reports\EDI.xls")
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
wb.save
App.Visible = 1
Ws.PrintPreview
app.quit
以上是正常的打印代码
我想遍历打印,套用遍历代码,实现打印所有行的内容
For Each r As Row In Tables("EDI").Rows
......
Next