Base class which exposes the various print options available for a sheet which can be saved with both a sheet and its custom view.

This class provides a way to control how a sheet is printed.

See

Hierarchy

Hierarchy

Implements

  • IChangeInfoContext

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get alignHeadersAndFootersWithMargins(): boolean
  • Gets or sets the value indicating whether to align header and footer margins with page margins.

    See

    Returns boolean

  • set alignHeadersAndFootersWithMargins(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get bottomMargin(): number
  • 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.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.

    See

    Returns number

  • set bottomMargin(a: number): void
  • Parameters

    • a: number

    Returns void

  • get draftQuality(): boolean
  • 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.

    Returns boolean

  • set draftQuality(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get footer(): string
  • Gets or sets the footer for each page of the printed worksheet.

    The '&' character in the header and footer is a special character. Depending on what is after it, the formatting of the text can be controlled or dynamic text can be inserted. Below is a list of the available commands: Section commands &L The following text will appear in the left section. The formatting of new sections is always the default formatting, regardless of the formatting of the previous section. &C The following text will appear in the center section. The formatting of new sections is always the default formatting, regardless of the formatting of the previous section. &R The following text will appear in the right section. The formatting of new sections is always the default formatting, regardless of the formatting of the previous section. Replacement commands && Insert the '&' character. &A Insert the current worksheet name. &D Insert the current date. &F Insert the current file name. &G Insert an image (Note: This command is currently not supported). &N Insert the number of pages the worksheet will need to print. &P Insert the current page number. &T Insert the current time. &Z Insert the current file path (without the file name). Formatting commands &B Toggle bold. &E Toggle double underlining. &I Toggle italics. &S Toggle strikethrough. &U Toggle underlining. &X Toggle superscript. &Y Toggle subscript. & Sets a new font size for the following text. The size is expressed as a positive integer. If a number is to follow this command in the header, it must be separated by a space. &"" Sets a new font for the following text. If the font name is not recognized, the default font will be used. &"," Sets the new font and font style for the following text. The font style is usually "Regular", "Bold", "Italic", or "Bold Italic", but can be other styles depending on the font. The available font styles can be seen in the font dialog when a font is selected.

    The header or footer string could look like this: &L&"Arial,Bold"&D&CPage &P of &N on &A&R&14&F.

    The footer for each page of the worksheet.

    See

    Returns string

  • set footer(a: string): void
  • Parameters

    • a: string

    Returns void

  • get footerMargin(): number
  • 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.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.

    See

    Returns number

  • set footerMargin(a: number): void
  • Parameters

    • a: number

    Returns void

  • get header(): string
  • Gets or sets the header for each page of the printed worksheet.

    The '&' character in the header and footer is a special character. Depending on what is after it, the formatting of the text can be controlled or dynamic text can be inserted. Below is a list of the available commands: Section commands &L The following text will appear in the left section. The formatting of new sections is always the default formatting, regardless of the formatting of the previous section. &C The following text will appear in the center section. The formatting of new sections is always the default formatting, regardless of the formatting of the previous section. &R The following text will appear in the right section. The formatting of new sections is always the default formatting, regardless of the formatting of the previous section. Replacement commands && Insert the '&' character. &A Insert the current worksheet name. &D Insert the current date. &F Insert the current file name. &G Insert an image (Note: This command is currently not supported). &N Insert the number of pages the worksheet will need to print. &P Insert the current page number. &T Insert the current time. &Z Insert the current file path (without the file name). Formatting commands &B Toggle bold. &E Toggle double underlining. &I Toggle italics. &S Toggle strikethrough. &U Toggle underlining. &X Toggle superscript. &Y Toggle subscript. & Sets a new font size for the following text. The size is expressed as a positive integer. If a number is to follow this command in the header, it must be separated by a space. &"" Sets a new font for the following text. If the font name is not recognized, the default font will be used. &"," Sets the new font and font style for the following text. The font style is usually "Regular", "Bold", "Italic", or "Bold Italic", but can be other styles depending on the font. The available font styles can be seen in the font dialog when a font is selected.

    The header or footer string could look like this: &L&"Arial,Bold"&D&CPage &P of &N on &A&R&14&F.

    The header for each page of the worksheet.

    See

    Returns string

  • set header(a: string): void
  • Parameters

    • a: string

    Returns void

  • get headerMargin(): number
  • 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.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.

    See

    Returns number

  • set headerMargin(a: number): void
  • Parameters

    • a: number

    Returns void

  • get leftMargin(): number
  • 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.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.

    See

    Returns number

  • set leftMargin(a: number): void
  • Parameters

    • a: number

    Returns void

  • get numberOfCopies(): number
  • Gets or sets the number of copies to print. The number of copies to print.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid range of 1 and 65535.

    Returns number

  • set numberOfCopies(a: number): void
  • Parameters

    • a: number

    Returns void

  • get orientation(): Orientation
  • Gets or sets the orientation for each page of the printed worksheet. The orientation for each page of the printed worksheet.

    Throws

    InvalidEnumArgumentException The assigned value is not defined in the orientation enumeration.

    Returns Orientation

  • set orientation(a: Orientation): void
  • Parameters

    Returns void

  • get orientationResolved(): Orientation
  • Returns the resolved orientation for each page of the printed worksheet.

    Returns Orientation

  • get pageNumbering(): PageNumbering
  • Gets or sets the method with which pages are numbered.

    If this is set to a value of UseStartPageNumber, the first page is numbered using the startPageNumber.

    The method with which pages are numbered.

    Throws

    InvalidEnumArgumentException The assigned value is not defined in the pageNumbering enumeration.

    See

    startPageNumber

    Returns PageNumbering

  • set pageNumbering(a: PageNumbering): void
  • Parameters

    Returns void

  • get paperSize(): PaperSize
  • Gets or sets the paper size for each printed page of the worksheet. The paper size for each printed page of the worksheet.

    Throws

    InvalidEnumArgumentException The assigned value is not defined in the paperSize enumeration.

    Returns PaperSize

  • set paperSize(a: PaperSize): void
  • Parameters

    Returns void

  • get printInBlackAndWhite(): boolean
  • 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.

    Returns boolean

  • set printInBlackAndWhite(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get printNotes(): PrintNotes
  • Gets or sets the way cell comments are printed.

    If this is set to a value of PrintAsDisplayed, the comments will only print if they are displayed on the worksheet. If comments are hidden but indicators are shown, neither the indicators nor the comments will print.

    The way cell notes are printed.

    Throws

    InvalidEnumArgumentException The assigned value is not defined in the printNotes enumeration.

    See

    Returns PrintNotes

  • set printNotes(a: PrintNotes): void
  • Parameters

    Returns void

  • get resolution(): number
  • Gets or sets the horizontal print resolution in DPI. The horizontal print resolution in DPI.

    Throws

    ArgumentOutOfRangeException The value assigned is outside the valid range of 0 and 65535.

    See

    verticalResolution

    Returns number

  • set resolution(a: number): void
  • Parameters

    • a: number

    Returns void

  • get rightMargin(): number
  • 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.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.

    See

    Returns number

  • set rightMargin(a: number): void
  • Parameters

    • a: number

    Returns void

  • get scaleHeadersAndFootersWithDocument(): boolean
  • Gets or sets the value indicating whether to scale the headers and footers with the document scaling.

    See

    Returns boolean

  • set scaleHeadersAndFootersWithDocument(a: boolean): void
  • Parameters

    • a: boolean

    Returns void

  • get startPageNumber(): number
  • Gets or sets the page number for the first printed page of the worksheet.

    For this value to be used, pageNumbering must be set to a value of UseStartPageNumber.

    The page number for the first printed page of the worksheet.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid range of -32765 and 32767.

    See

    pageNumbering

    Returns number

  • set startPageNumber(a: number): void
  • Parameters

    • a: number

    Returns void

  • get topMargin(): number
  • 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.

    Throws

    ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.

    See

    Returns number

  • set topMargin(a: number): void
  • Parameters

    • a: number

    Returns void

  • get verticalResolution(): number
  • Gets or sets the vertical print resolution in DPI. The vertical print resolution in DPI.

    Throws

    ArgumentOutOfRangeException The value assigned is outside the valid range of 0 and 65535.

    See

    resolution

    Returns number

  • set verticalResolution(a: number): void
  • Parameters

    • a: number

    Returns void

Methods

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Resets the print options to their default settings.

    The defaults used for each setting are the same defaults with which Microsoft Excel creates a blank worksheet.

    Returns void

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean