XlsPageSetup module

class XlsPageSetup.XlsPageSetup

Bases: XlsPageSetupBase, IPageSetup

Represents the page setup settings for a worksheet in Excel.

This class extends XlsPageSetupBase and implements IPageSetup to provide functionality for configuring page layout options such as print area, print titles, gridlines, and other page-related settings.

Clone(parent: SpireObject) XlsPageSetup

Creates a copy of the page setup.

Parameters:

parent (SpireObject) – The parent object for the cloned page setup.

Returns:

A new instance of the page setup.

Return type:

XlsPageSetup

property DefaultRowHeight: int

Gets or sets the default row height for the worksheet.

Returns:

The default row height in points.

Return type:

int

property DefaultRowHeightFlag: bool

Gets or sets whether the default row height is enabled.

Returns:

True if default row height is enabled; otherwise, False.

Return type:

bool

GetStoreSize(version: ExcelVersion) int

Gets the storage size required for this page setup with the specified Excel version.

Parameters:

version (ExcelVersion) – The Excel version to determine storage size for.

Returns:

The storage size in bytes.

Return type:

int

property IsFitToPage: bool

Gets or sets whether the worksheet is scaled to fit a single page when printed.

Returns:

True if the worksheet is scaled to fit a page; otherwise, False.

Return type:

bool

property IsPrintGridlines: bool

Gets or sets whether gridlines are printed.

Returns:

True if gridlines are printed; otherwise, False.

Return type:

bool

property IsPrintHeadings: bool

Gets or sets whether row and column headings are printed.

Returns:

True if row and column headings are printed; otherwise, False.

Return type:

bool

property IsSummaryColumnRight: bool

Gets or sets whether summary columns appear to the right of detail columns in an outline.

Returns:

True if summary columns appear to the right; otherwise, False.

Return type:

bool

property IsSummaryRowBelow: bool

Gets or sets whether summary rows appear below detail rows in an outline.

Returns:

True if summary rows appear below detail; otherwise, False.

Return type:

bool

property NeedDataArray: bool

Gets whether data array is needed for this page setup.

Returns:

True if data array is needed; otherwise, False.

Return type:

bool

property PrintArea: str

Gets or sets the range to print, specified as a string using A1-style references.

Returns:

The print area as an A1-style range reference.

Return type:

str

property PrintTitleColumns: str

Gets or sets the columns that contain the cells to be repeated on the left side of each page.

Returns:

The title columns as an A1-style reference.

Return type:

str

property PrintTitleRows: str

Gets or sets the rows that contain the cells to be repeated at the top of each page.

Returns:

The title rows as an A1-style reference.

Return type:

str

property RelationId: str

Gets or sets relation id to the printer settings part.

Returns:

The relation ID for printer settings.

Return type:

str