Printing Range of Pages using SheetRender and WorkbookRender
Contents
[
Hide
]
Microsoft Excel allows you to print range of pages of workbook or worksheet. The following screenshot shows the Microsoft Excel interface to specify the range of pages.
Aspose.Cells provides the WorkbookRender.ToPrinter(string PrinterName, int PrintPageIndex, int PrintPageCount) and SheetRender.ToPrinter(string PrinterName, int PrintPageIndex, int PrintPageCount) methods for this purpose.
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 the pages 2-5 of the workbook and worksheet.