Dim App As New MSExcel.ApplicationDim Wb As MSExcel.WorkBook = App.WorkBooks.Open("d:\11.xls")Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
Dim i As Integer = 45Do While i < ws.usedRange.rows.count
Ws.Rows(i).PageBreak = MSExcel.XlPageBreak.xlPageBreakManual i += 44Loopwb.saved = TrueApp.Visible = TrueWs.PrintPreviewApp.Quit