Static
$tStatic
nextGets or sets the value indicating whether to align header and footer margins with page margins.
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.
ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.
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.
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.
Gets or sets the range of columns which should be printed on every page.
ArgumentException
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.
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:
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.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.
ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.
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:
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.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.
ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.
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.
ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.
Gets or sets the maximum number of pages allowed in the horizontal direction to print the worksheet.
A value of zero indicates no maximum is used in the horizontal direction. As many pages as needed will be used.
Note: For MaxPagesHorizontally and maxPagesVertically to affect the way the worksheet is printed, scalingType must be set to a value of FitToPages. However, if the the ScalingType is different and these values aren't used, they will still be saved with the worksheet.
The maximum number of pages allowed in the horizontal direction to print the worksheet.ArgumentOutOfRangeException The value assigned is outside the valid range of 0 and 32767.
Gets or sets the maximum number of pages allowed in the vertical direction to print the worksheet.
A value of zero indicates no maximum is used in the vertical direction. As many pages as needed will be used.
Note: For maxPagesHorizontally and MaxPagesVertically to affect the way the worksheet is printed, scalingType must be set to a value of FitToPages. However, if the the ScalingType is different and these values aren't used, they will still be saved with the worksheet.
The maximum number of pages allowed in the vertical direction to print the worksheet.ArgumentOutOfRangeException The value assigned is outside the valid range of 0 and 32767.
Gets or sets the number of copies to print. The number of copies to print.
ArgumentOutOfRangeException The assigned value is outside the valid range of 1 and 65535.
Gets or sets the orientation for each page of the printed worksheet. The orientation for each page of the printed worksheet.
InvalidEnumArgumentException The assigned value is not defined in the orientation enumeration.
Returns the resolved orientation for each page of the printed worksheet.
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.InvalidEnumArgumentException The assigned value is not defined in the pageNumbering enumeration.
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.
InvalidEnumArgumentException The assigned value is not defined in the pageOrder enumeration.
Gets or sets the paper size for each printed page of the worksheet. The paper size for each printed page of the worksheet.
InvalidEnumArgumentException The assigned value is not defined in the paperSize enumeration.
Gets or sets the way error values of cells are printed.
A cell can have an error value if its WorksheetCell.value is set directly to an ErrorValue or if it is set to a Formula that evaluates to an error.
The way error values of cells are printed.InvalidEnumArgumentException The assigned value is not defined in the printErrors enumeration.
Gets or sets the value which indicates whether to print the worksheet gridlines. The value which indicates whether to print the worksheet gridlines.
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.
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.InvalidEnumArgumentException The assigned value is not defined in the printNotes enumeration.
Gets or sets the value indicating whether to print row and column headers.
The row and column headers show the identifier of the row or column.
The value indicating whether to print row and column headers.Gets or sets the horizontal print resolution in DPI. The horizontal print resolution in DPI.
ArgumentOutOfRangeException The value assigned is outside the valid range of 0 and 65535.
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.
ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.
Gets or sets the range of rows which should be printed on every page.
ArgumentException
Gets or sets the value indicating whether to scale the headers and footers with the document scaling.
Gets or sets the scaling factor to use when printing the worksheet.
The scaling factor is similar to magnifications in that is it stored as a percentage of the normal scaling. A value of 100 indicates normal scaling whereas a value of 200 indicates the worksheet is scaled to twice its normal size.
Note: For ScalingFactor to affect the way the worksheet is printed, scalingType must be set to a value of UseScalingFactor.
The scaling factor to use when printing the worksheet.ArgumentOutOfRangeException The assigned value is outside the valid range of 10 and 400.
Gets or sets the method for scaling the worksheet when it is printed.
If this is set to a value of UseScalingFactor, scalingFactor is used to uniformly scale the worksheet on the printed pages.
If this is set to a value of FitToPages, maxPagesHorizontally and maxPagesVertically are used to set the maximum number of pages to fit the printed worksheet into in both directions.
The method for scaling the worksheet when it is printed.InvalidEnumArgumentException The assigned value is not defined in the scalingType enumeration.
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.ArgumentOutOfRangeException The assigned value is outside the valid range of -32765 and 32767.
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.
ArgumentOutOfRangeException The assigned value is outside the valid margin range of 0 and 100 inches.
Gets or sets the vertical print resolution in DPI. The vertical print resolution in DPI.
ArgumentOutOfRangeException The value assigned is outside the valid range of 0 and 65535.
Clears all page breaks from the PrintOptions.
1.clear]] @see [[PageBreakCollection
1.remove]]Gets the page break at the specified index.
ArgumentOutOfRangeException Occurs when 'index' is less than 0 or greater than of equal to PageBreakCollection`1.count.
A PageBreak-derived instance.
The index of the page break to get.
Gets the collection of horizontal page breaks in the Worksheet.
Inserts a horizontal and/or vertical page break before the specified cell.
If the cell is not contained in one of the print areas in the printAreas collection, the page breaks added will be as follows: If the cell is at the top-left corner of the Worksheet, an exception will be thrown. If the cell is on the left edge of the Worksheet, a horizontal page break will be inserted above the cell. If the cell is on the top edge of the Worksheet, a vertical page break will be inserted to the left of the cell. If the cell is anywhere else in the Worksheet, a horizontal page break will be inserted above the cell and a vertical page break will be inserted to the left of the cell.
If the cell is contained in one of the print areas in the printAreas collection, the page breaks added will be as follows: If the cell is at the top-left corner of the print area, no page breaks will be inserted. If the cell is on the left edge of the print area, a horizontal page break will be inserted above the cell. If the cell is on the top edge of the print area, a vertical page break will be inserted to the left of the cell. If the cell is anywhere else in the print area, a horizontal page break will be inserted above the cell and a vertical page break will be inserted to the left of the cell.
When page breaks are inserted in a print area, they will only extend to the edges of the print area.
ArgumentNullException Occurs when 'cell' is null.
ArgumentException Occurs when 'cell' is at the top-left corner of the Worksheet.
The cell at which to insert the page break(s).
Inserts a vertical page break to the left of the specified column.
If the column is not contained in one of the print areas in the printAreas collection, the page breaks added will be as follows: If the column is at the left edge of the Worksheet, an exception will be thrown. If the column is anywhere else in the Worksheet, a vertical page break will be inserted to the left of the column.
If the column is contained in one of the print areas in the printAreas collection, the page breaks added will be as follows: If the column is at the left edge of the print area, no page break will be inserted. If the column is anywhere else in the print area, a vertical page break will be inserted to the left of the column.
ArgumentNullException Occurs when 'column' is null.
ArgumentException Occurs when 'column' is at the left edge of the Worksheet.
The column at which to insert the page break.
Inserts a horizontal page break above the specified row.
If the row is not contained in one of the print areas in the printAreas collection, the page breaks added will be as follows: If the row is at the top edge of the Worksheet, an exception will be thrown. If the row is anywhere else in the Worksheet, a horizontal page break will be inserted above the row.
If the row is contained in one of the print areas in the printAreas collection, the page breaks added will be as follows: If the row is at the top edge of the print area, no page break will be inserted. If the row is anywhere else in the print area, a horizontal page break will be inserted above the row.
ArgumentNullException Occurs when 'row' is null.
ArgumentException Occurs when 'row' is at the top edge of the Worksheet.
The row at which to insert the page break.
Gets the print area at the specified index.
ArgumentOutOfRangeException Occurs when 'index' is less than 0 or greater than or equal to the size of the collection.
A WorksheetRegion instance representing a print area in the Worksheet.
The index of the print area to get.
Gets the collection of print areas in the Worksheet.
Gets the page break at the specified index.
ArgumentOutOfRangeException Occurs when 'index' is less than 0 or greater than of equal to PageBreakCollection`1.count.
A PageBreak-derived instance.
The index of the page break to get.
Gets the collection of vertical page breaks in the Worksheet.
Static
compareStatic
compareStatic
equalsStatic
equalsStatic
getStatic
getStatic
getStatic
reference
Class which exposes the various print options available for a worksheet which can be saved with both a worksheet and a custom view.
This class provides a way to control how a worksheet is printed.
See