Table of Contents

Interface IXLPageSetup

Namespace
SlapKit.Excel.Excel
Assembly
SlapKit.Excel.dll
public interface IXLPageSetup : IXLPageSetupBase
Inherited Members
Extension Methods

Properties

AlignHFWithMargins

Gets or sets a value indicating whether the header and footer margins are aligned with the left and right margins of the worksheet.

bool AlignHFWithMargins { get; set; }

Property Value

bool

true if the header and footer margins are aligned with the left and right margins of the worksheet; otherwise, false.

BlackAndWhite

Gets or sets a value indicating whether the worksheet will be printed in black and white.

bool BlackAndWhite { get; set; }

Property Value

bool

true if the worksheet will be printed in black and white; otherwise, false.

CenterHorizontally

Gets or sets a value indicating whether the worksheet will be centered on the page horizontally.

bool CenterHorizontally { get; set; }

Property Value

bool

true if the worksheet will be centered on the page horizontally; otherwise, false.

CenterVertically

Gets or sets a value indicating whether the worksheet will be centered on the page vertically.

bool CenterVertically { get; set; }

Property Value

bool

true if the worksheet will be centered on the page vertically; otherwise, false.

ColumnBreaks

Gets a list with the column breaks (for printing).

List<int> ColumnBreaks { get; }

Property Value

List<int>

DifferentFirstPageOnHF

bool DifferentFirstPageOnHF { get; set; }

Property Value

bool

DifferentOddEvenPagesOnHF

bool DifferentOddEvenPagesOnHF { get; set; }

Property Value

bool

DraftQuality

Gets or sets a value indicating whether the worksheet will be printed in draft quality.

bool DraftQuality { get; set; }

Property Value

bool

true if the worksheet will be printed in draft quality; otherwise, false.

FirstColumnToRepeatAtLeft

Gets the first column to repeat on the left of the printed pages.

int FirstColumnToRepeatAtLeft { get; }

Property Value

int

The first column to repeat on the left of the printed pages.

FirstPageNumber

Gets or sets the page number that will begin the printout.

For example, the first page of your printout could be numbered page 5.

uint? FirstPageNumber { get; set; }

Property Value

uint?

FirstRowToRepeatAtTop

Gets the first row that will repeat on the top of the printed pages.

Use SetRowsToRepeatAtTop() to set the rows that will be repeated on the top of the printed pages.

int FirstRowToRepeatAtTop { get; }

Property Value

int

Gets an object to work with the page footers.

IXLHeaderFooter Footer { get; }

Property Value

IXLHeaderFooter

Header

Gets an object to work with the page headers.

IXLHeaderFooter Header { get; }

Property Value

IXLHeaderFooter

HorizontalDpi

Gets or sets the horizontal dpi for printing the worksheet.

int HorizontalDpi { get; set; }

Property Value

int

LastColumnToRepeatAtLeft

Gets the last column to repeat on the left of the printed pages.

int LastColumnToRepeatAtLeft { get; }

Property Value

int

The last column to repeat on the left of the printed pages.

LastRowToRepeatAtTop

Gets the last row that will repeat on the top of the printed pages.

Use SetRowsToRepeatAtTop() to set the rows that will be repeated on the top of the printed pages.

int LastRowToRepeatAtTop { get; }

Property Value

int

PageOrder

Gets or sets the page order for printing.

XLPageOrderValues PageOrder { get; set; }

Property Value

XLPageOrderValues

PageOrientation

Gets or sets the page orientation for printing.

XLPageOrientation PageOrientation { get; set; }

Property Value

XLPageOrientation

The page orientation.

PagesTall

Gets or sets the number of pages tall (vertical) the worksheet will be printed on.

If you don't specify the PagesWide, Excel will adjust that value

based on the contents of the worksheet and the PagesTall number.

Setting this value will override the Scale value.

int PagesTall { get; set; }

Property Value

int

PagesWide

Gets or sets the number of pages wide (horizontal) the worksheet will be printed on.

If you don't specify the PagesTall, Excel will adjust that value

based on the contents of the worksheet and the PagesWide number.

Setting this value will override the Scale value.

int PagesWide { get; set; }

Property Value

int

PaperSize

Gets or sets the size of the paper to print the worksheet.

XLPaperSize PaperSize { get; set; }

Property Value

XLPaperSize

PrintAreas

Gets an object to manage the print areas of the worksheet.

IXLPrintAreas PrintAreas { get; }

Property Value

IXLPrintAreas

PrintErrorValue

Gets or sets how error values will be printed.

XLPrintErrorValues PrintErrorValue { get; set; }

Property Value

XLPrintErrorValues

RowBreaks

Gets a list with the row breaks (for printing).

List<int> RowBreaks { get; }

Property Value

List<int>

Scale

Gets or sets the scale at which the worksheet will be printed.

The worksheet will be printed on as many pages as necessary to print at the given scale.

Setting this value will override the PagesWide and PagesTall values.

int Scale { get; set; }

Property Value

int

ScaleHFWithDocument

Gets or sets a value indicating whether Excel will automatically adjust the font size to the scale of the worksheet.

bool ScaleHFWithDocument { get; set; }

Property Value

bool

true if Excel will automatically adjust the font size to the scale of the worksheet; otherwise, false.

ShowComments

Gets or sets how the comments will be printed.

XLShowCommentsValues ShowComments { get; set; }

Property Value

XLShowCommentsValues

ShowGridlines

Gets or sets a value indicating whether the gridlines will be printed.

bool ShowGridlines { get; set; }

Property Value

bool

true if the gridlines will be printed; otherwise, false.

ShowRowAndColumnHeadings

Gets or sets a value indicating whether to show row numbers and column letters/numbers.

bool ShowRowAndColumnHeadings { get; set; }

Property Value

bool

true to show row numbers and column letters/numbers; otherwise, false.

VerticalDpi

Gets or sets the vertical dpi for printing the worksheet.

int VerticalDpi { get; set; }

Property Value

int

Methods

AddHorizontalPageBreak(int)

Adds a horizontal page break after the given row.

void AddHorizontalPageBreak(int row)

Parameters

row int

The row to insert the break.

AddVerticalPageBreak(int)

Adds a vertical page break after the given column.

void AddVerticalPageBreak(int column)

Parameters

column int

The column to insert the break.

AdjustTo(int)

Sets the scale at which the worksheet will be printed. This is equivalent to setting the Scale property.

The worksheet will be printed on as many pages as necessary to print at the given scale.

Setting this value will override the PagesWide and PagesTall values.

void AdjustTo(int percentageOfNormalSize)

Parameters

percentageOfNormalSize int

The scale at which the worksheet will be printed.

FitToPages(int, int)

Gets or sets the number of pages the worksheet will be printed on.

This is equivalent to setting both PagesWide and PagesTall properties.

Setting this value will override the Scale value.

void FitToPages(int pagesWide, int pagesTall)

Parameters

pagesWide int

The pages wide.

pagesTall int

The pages tall.

SetAlignHFWithMargins()

IXLPageSetup SetAlignHFWithMargins()

Returns

IXLPageSetup

SetAlignHFWithMargins(bool)

IXLPageSetup SetAlignHFWithMargins(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetBlackAndWhite()

IXLPageSetup SetBlackAndWhite()

Returns

IXLPageSetup

SetBlackAndWhite(bool)

IXLPageSetup SetBlackAndWhite(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetCenterHorizontally()

IXLPageSetup SetCenterHorizontally()

Returns

IXLPageSetup

SetCenterHorizontally(bool)

IXLPageSetup SetCenterHorizontally(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetCenterVertically()

IXLPageSetup SetCenterVertically()

Returns

IXLPageSetup

SetCenterVertically(bool)

IXLPageSetup SetCenterVertically(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetColumnsToRepeatAtLeft(int, int)

Sets the rows to repeat on the left of the printed pages.

void SetColumnsToRepeatAtLeft(int firstColumnToRepeatAtLeft, int lastColumnToRepeatAtLeft)

Parameters

firstColumnToRepeatAtLeft int

The first column to repeat at left.

lastColumnToRepeatAtLeft int

The last column to repeat at left.

SetColumnsToRepeatAtLeft(string)

Sets the rows to repeat on the left of the printed pages.

void SetColumnsToRepeatAtLeft(string range)

Parameters

range string

The range of rows to repeat on the left of the printed pages.

SetDifferentFirstPageOnHF()

IXLPageSetup SetDifferentFirstPageOnHF()

Returns

IXLPageSetup

SetDifferentFirstPageOnHF(bool)

IXLPageSetup SetDifferentFirstPageOnHF(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetDifferentOddEvenPagesOnHF()

IXLPageSetup SetDifferentOddEvenPagesOnHF()

Returns

IXLPageSetup

SetDifferentOddEvenPagesOnHF(bool)

IXLPageSetup SetDifferentOddEvenPagesOnHF(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetDraftQuality()

IXLPageSetup SetDraftQuality()

Returns

IXLPageSetup

SetDraftQuality(bool)

IXLPageSetup SetDraftQuality(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetFirstPageNumber(uint?)

IXLPageSetup SetFirstPageNumber(uint? value)

Parameters

value uint?

Returns

IXLPageSetup

SetHorizontalDpi(int)

IXLPageSetup SetHorizontalDpi(int value)

Parameters

value int

Returns

IXLPageSetup

SetPageOrder(XLPageOrderValues)

IXLPageSetup SetPageOrder(XLPageOrderValues value)

Parameters

value XLPageOrderValues

Returns

IXLPageSetup

SetPageOrientation(XLPageOrientation)

IXLPageSetup SetPageOrientation(XLPageOrientation value)

Parameters

value XLPageOrientation

Returns

IXLPageSetup

SetPagesTall(int)

IXLPageSetup SetPagesTall(int value)

Parameters

value int

Returns

IXLPageSetup

SetPagesWide(int)

IXLPageSetup SetPagesWide(int value)

Parameters

value int

Returns

IXLPageSetup

SetPaperSize(XLPaperSize)

IXLPageSetup SetPaperSize(XLPaperSize value)

Parameters

value XLPaperSize

Returns

IXLPageSetup

SetPrintErrorValue(XLPrintErrorValues)

IXLPageSetup SetPrintErrorValue(XLPrintErrorValues value)

Parameters

value XLPrintErrorValues

Returns

IXLPageSetup

SetRowsToRepeatAtTop(int, int)

Sets the rows to repeat on the top of the printed pages.

void SetRowsToRepeatAtTop(int firstRowToRepeatAtTop, int lastRowToRepeatAtTop)

Parameters

firstRowToRepeatAtTop int

The first row to repeat at top.

lastRowToRepeatAtTop int

The last row to repeat at top.

SetRowsToRepeatAtTop(string)

Sets the rows to repeat on the top of the printed pages.

void SetRowsToRepeatAtTop(string range)

Parameters

range string

The range of rows to repeat on the top of the printed pages.

SetScale(int)

IXLPageSetup SetScale(int value)

Parameters

value int

Returns

IXLPageSetup

SetScaleHFWithDocument()

IXLPageSetup SetScaleHFWithDocument()

Returns

IXLPageSetup

SetScaleHFWithDocument(bool)

IXLPageSetup SetScaleHFWithDocument(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetShowComments(XLShowCommentsValues)

IXLPageSetup SetShowComments(XLShowCommentsValues value)

Parameters

value XLShowCommentsValues

Returns

IXLPageSetup

SetShowGridlines()

IXLPageSetup SetShowGridlines()

Returns

IXLPageSetup

SetShowGridlines(bool)

IXLPageSetup SetShowGridlines(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetShowRowAndColumnHeadings()

IXLPageSetup SetShowRowAndColumnHeadings()

Returns

IXLPageSetup

SetShowRowAndColumnHeadings(bool)

IXLPageSetup SetShowRowAndColumnHeadings(bool value)

Parameters

value bool

Returns

IXLPageSetup

SetVerticalDpi(int)

IXLPageSetup SetVerticalDpi(int value)

Parameters

value int

Returns

IXLPageSetup