Printing Range of Pages using SheetRender and WorkbookRender

Microsoft Excel Interface to Specify the Range of Pages to Print

The following sample code illustrates the use of WorkbookRender.ToPrinter(string PrinterName, int PrintPageIndex, int PrintPageCount) and SheetRender.ToPrinter(string PrinterName, int PrintPageIndex, int PrintPageCount) methods. It prints pages 2‑5 of both the workbook and the worksheet.