Class which exposes the various print options available for a worksheet which can be saved with both a worksheet and a custom view.

PrintOptions

new PrintOptions(a: Worksheet, b: boolean): PrintOptions

Returns PrintOptions

Inherited from: PrintOptionsBase

Gets or sets the value indicating whether to align header and footer margins with page margins.

get alignHeadersAndFootersWithMargins(): boolean

Returns boolean

set alignHeadersAndFootersWithMargins(a: boolean): void

Parameters

  • a: boolean

Returns void

Inherited from: PrintOptionsBase

Gets or sets the margin at the bottom of each printed page of the worksheet, specified in inches. The margin at the bottom of each printed page of the worksheet, specified in inches.

get bottomMargin(): number

Returns number

set bottomMargin(a: number): void

Parameters

  • a: number

Returns void

Gets or sets the value indicating whether the printed pages should be centered horizontally. The value indicating whether the printed pages should be centered horizontally.

get centerHorizontally(): boolean

Returns boolean

set centerHorizontally(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the value indicating whether the printed pages should be centered vertically. The value indicating whether the printed pages should be centered vertically.

get centerVertically(): boolean

Returns boolean

set centerVertically(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the range of columns which should be printed on every page.

get columnsToRepeatAtLeft(): RepeatTitleRange

Returns RepeatTitleRange

set columnsToRepeatAtLeft(a: RepeatTitleRange): void

Parameters

Returns void

Inherited from: PrintOptionsBase

Gets or sets the value indicating whether the printed pages should be printed using draft quality. The value indicating whether the printed pages should be printed using draft quality.

get draftQuality(): boolean

Returns boolean

set draftQuality(a: boolean): void

Parameters

  • a: boolean

Returns void

Inherited from: PrintOptionsBase

Gets or sets the footer for each page of the printed worksheet.

get footer(): string

Returns string

set footer(a: string): void

Parameters

  • a: string

Returns void

Inherited from: PrintOptionsBase

Gets or sets the footer margin for each printed page of the worksheet, specified in inches. The footer margin for each printed page of the worksheet, specified in inches.

get footerMargin(): number

Returns number

set footerMargin(a: number): void

Parameters

  • a: number

Returns void

Inherited from: PrintOptionsBase

Gets or sets the header for each page of the printed worksheet.

get header(): string

Returns string

set header(a: string): void

Parameters

  • a: string

Returns void

Inherited from: PrintOptionsBase

Gets or sets the header margin for each printed page of the worksheet, specified in inches. The header margin for each printed page of the worksheet, specified in inches.

get headerMargin(): number

Returns number

set headerMargin(a: number): void

Parameters

  • a: number

Returns void

Inherited from: PrintOptionsBase

Gets or sets the margin at the left of each printed page of the worksheet, specified in inches. The margin at the left of each printed page of the worksheet, specified in inches.

get leftMargin(): number

Returns number

set leftMargin(a: number): void

Parameters

  • a: number

Returns void

Gets or sets the maximum number of pages allowed in the horizontal direction to print the worksheet.

get maxPagesHorizontally(): number

Returns number

set maxPagesHorizontally(a: number): void

Parameters

  • a: number

Returns void

Gets or sets the maximum number of pages allowed in the vertical direction to print the worksheet.

get maxPagesVertically(): number

Returns number

set maxPagesVertically(a: number): void

Parameters

  • a: number

Returns void

Inherited from: PrintOptionsBase

Gets or sets the number of copies to print. The number of copies to print.

get numberOfCopies(): number

Returns number

set numberOfCopies(a: number): void

Parameters

  • a: number

Returns void

Inherited from: PrintOptionsBase

Gets or sets the orientation for each page of the printed worksheet. The orientation for each page of the printed worksheet.

get orientation(): Orientation

Returns Orientation

set orientation(a: Orientation): void

Parameters

Returns void

Inherited from: PrintOptionsBase

Returns the resolved orientation for each page of the printed worksheet.

get orientationResolved(): Orientation

Returns Orientation

Inherited from: PrintOptionsBase

Gets or sets the method with which pages are numbered.

get pageNumbering(): PageNumbering

Returns PageNumbering

set pageNumbering(a: PageNumbering): void

Parameters

Returns void

Gets or sets the order in which to print pages for multiple page worksheets. The order in which to print pages for multiple page worksheets.

get pageOrder(): PageOrder

Returns PageOrder

set pageOrder(a: PageOrder): void

Parameters

Returns void

Inherited from: PrintOptionsBase

Gets or sets the paper size for each printed page of the worksheet. The paper size for each printed page of the worksheet.

get paperSize(): PaperSize

Returns PaperSize

set paperSize(a: PaperSize): void

Parameters

Returns void

Inherited from: PrintOptionsBase

Gets or sets the way error values of cells are printed.

get printErrors(): PrintErrors

Returns PrintErrors

set printErrors(a: PrintErrors): void

Parameters

Returns void

Gets or sets the value which indicates whether to print the worksheet gridlines. The value which indicates whether to print the worksheet gridlines.

get printGridlines(): boolean

Returns boolean

set printGridlines(a: boolean): void

Parameters

  • a: boolean

Returns void

Inherited from: PrintOptionsBase

Gets or sets the value indicating whether the worksheet should be printed in black and white. The value indicating whether the worksheet should be printed in black and white.

get printInBlackAndWhite(): boolean

Returns boolean

set printInBlackAndWhite(a: boolean): void

Parameters

  • a: boolean

Returns void

Inherited from: PrintOptionsBase

Gets or sets the way cell comments are printed.

get printNotes(): PrintNotes

Returns PrintNotes

set printNotes(a: PrintNotes): void

Parameters

Returns void

Gets or sets the value indicating whether to print row and column headers.

get printRowAndColumnHeaders(): boolean

Returns boolean

set printRowAndColumnHeaders(a: boolean): void

Parameters

  • a: boolean

Returns void

Inherited from: PrintOptionsBase

Gets or sets the horizontal print resolution in DPI. The horizontal print resolution in DPI.

get resolution(): number

Returns number

set resolution(a: number): void

Parameters

  • a: number

Returns void

Inherited from: PrintOptionsBase

Gets or sets the margin at the right of each printed page of the worksheet, specified in inches. The margin at the right of each printed page of the worksheet, specified in inches.

get rightMargin(): number

Returns number

set rightMargin(a: number): void

Parameters

  • a: number

Returns void

Gets or sets the range of rows which should be printed on every page.

get rowsToRepeatAtTop(): RepeatTitleRange

Returns RepeatTitleRange

set rowsToRepeatAtTop(a: RepeatTitleRange): void

Parameters

Returns void

Inherited from: PrintOptionsBase

Gets or sets the value indicating whether to scale the headers and footers with the document scaling.

get scaleHeadersAndFootersWithDocument(): boolean

Returns boolean

set scaleHeadersAndFootersWithDocument(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the scaling factor to use when printing the worksheet.

get scalingFactor(): number

Returns number

set scalingFactor(a: number): void

Parameters

  • a: number

Returns void

Gets or sets the method for scaling the worksheet when it is printed.

get scalingType(): ScalingType

Returns ScalingType

set scalingType(a: ScalingType): void

Parameters

Returns void

Inherited from: PrintOptionsBase

Gets or sets the page number for the first printed page of the worksheet.

get startPageNumber(): number

Returns number

set startPageNumber(a: number): void

Parameters

  • a: number

Returns void

Inherited from: PrintOptionsBase

Gets or sets the margin at the top of each printed page of the worksheet, specified in inches. The margin at the top of each printed page of the worksheet, specified in inches.

get topMargin(): number

Returns number

set topMargin(a: number): void

Parameters

  • a: number

Returns void

Inherited from: PrintOptionsBase

Gets or sets the vertical print resolution in DPI. The vertical print resolution in DPI.

get verticalResolution(): number

Returns number

set verticalResolution(a: number): void

Parameters

  • a: number

Returns void

Clears all page breaks from the [[PrintOptions]].

clearPageBreaks(): void

Returns void

Gets the page break at the specified index.

horizontalPageBreaks(index: number): HorizontalPageBreak

Parameters

  • index: number

    The index of the page break to get.

Returns HorizontalPageBreak

Inserts a horizontal and/or vertical page break before the specified cell.

insertPageBreak(cell: WorksheetCell): void

Parameters

  • cell: WorksheetCell

    The cell at which to insert the page break(s).

Returns void

Gets the print area at the specified index.

printAreas(index: number): WorksheetRegion

Parameters

  • index: number

    The index of the print area to get.

Returns WorksheetRegion

Resets the print options to their default settings.

reset(): void

Returns void

Gets the page break at the specified index.

verticalPageBreaks(index: number): VerticalPageBreak

Parameters

  • index: number

    The index of the page break to get.

Returns VerticalPageBreak