[]
        
(Showing Draft Content)

Working With Page Setup

GcExcel .NET allows users to paginate each worksheet using the properties of the IPageSetup interface.

You can customize the page size, print area, print title rows, print title columns; specify horizontal page breaks, vertical page breaks, the maximum number of pages for horizontal and vertical pagination etc. along with zoom and scale factors as per your preferences while exporting a spreadsheet to a PDF file.

In order to set pagination in a workheet, users can explore the following properties of the IPageSetup interface and the IWorksheet interface:

Settings

Description

IPageSetup.PaperSize

This property can be used to determine the size of each page. For more information on implementation of this property, refer to Configure Paper Settings.

IPageSetup.Orientation

This property can be used to specify whether the worksheet should be printed in landscape orientation or portrait orientation. For more information on implementation of this property, refer to Configure Page Settings.

IPageSetup.PrintTitleRows

This property can be used to specify the rows that you want to print at the top of each page. For more information on implementation of this property, refer to Configure Rows to Repeat at Top and Bottom.

IPageSetup.PrintTitleColumns

This property can be used to specify the columns that you want to print at the left of each page. For more information on implementation of this property, refer to Configure Columns to Repeat at Left and Right.

IPageSetup.PrintArea

This property can be used to specify the print area in a worksheet. If the print area is not specified by the user, the used range of the sheet is printed by default. For more information on implementation of this property, refer to Configure Print Area.

IPageSetup.Zoom

This property can be used to use the result of zoom in order to paginate a worksheet. For more information on implementation of this property, refer to Configure Paper Settings.

IPageSetup.FitToPagesWide

This property can be used to specify the maximum number of pages for horizontal pagination. After this property is set, the worksheet can be scaled to fit all columns to the pages. For more information on implementation of this property, refer to Configure Paper Settings.

IPageSetup.FitToPagesTall

This property can be used to specify the maximum number of pages for vertical pagination. After this property is set, the worksheet can be scaled to fit all rows to the pages. For more information on implementation of this property, refer to Configure Paper Settings.

IPageSetup.IsPercentScale

This property specifies a boolean value to control how the worksheet is scaled while exporting to PDF. If the value is set to True, you can use the Zoom property of the IPageSetup interface and if the value is set to false, you can use the FitToPagesWide and FitToPagesTall property of the IPageSetup interface. For more information on implementation of this property, refer to Configure Paper Settings.

IWorksheet.HPageBreaks

This property can be used to specify the horizontal page breaks that will split rows to multiple pages. However, this property doesn't work when the property IsPercentScale is set to false. For more information on implementation of this property, refer to Configure Page Breaks.

IWorksheet.VPageBreaks

This property can be used to specify the vertical page breaks that will split columns to multiple pages. However, this property doesn't work when the property IsPercentScale is set to false. For more information on implementation of this property, refer to Configure Page Breaks.

For more information on setting pagination, refer to Page Setup.

Note: The Export to PDF feature doesn't support inserting double underline, superscripts and subscripts etc. while working with page set up settings in a spreadsheet.