Interface IXLPageSetup
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
trueif 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
trueif 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
trueif 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
trueif 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
DifferentFirstPageOnHF
bool DifferentFirstPageOnHF { get; set; }
Property Value
DifferentOddEvenPagesOnHF
bool DifferentOddEvenPagesOnHF { get; set; }
Property Value
DraftQuality
Gets or sets a value indicating whether the worksheet will be printed in draft quality.
bool DraftQuality { get; set; }
Property Value
- bool
trueif 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
Footer
Gets an object to work with the page footers.
IXLHeaderFooter Footer { get; }
Property Value
Header
Gets an object to work with the page headers.
IXLHeaderFooter Header { get; }
Property Value
HorizontalDpi
Gets or sets the horizontal dpi for printing the worksheet.
int HorizontalDpi { get; set; }
Property Value
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
PageOrder
Gets or sets the page order for printing.
XLPageOrderValues PageOrder { get; set; }
Property Value
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
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
PaperSize
Gets or sets the size of the paper to print the worksheet.
XLPaperSize PaperSize { get; set; }
Property Value
PrintAreas
Gets an object to manage the print areas of the worksheet.
IXLPrintAreas PrintAreas { get; }
Property Value
PrintErrorValue
Gets or sets how error values will be printed.
XLPrintErrorValues PrintErrorValue { get; set; }
Property Value
RowBreaks
Gets a list with the row breaks (for printing).
List<int> RowBreaks { get; }
Property Value
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
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
trueif 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
ShowGridlines
Gets or sets a value indicating whether the gridlines will be printed.
bool ShowGridlines { get; set; }
Property Value
- bool
trueif 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
trueto 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
Methods
AddHorizontalPageBreak(int)
Adds a horizontal page break after the given row.
void AddHorizontalPageBreak(int row)
Parameters
rowintThe row to insert the break.
AddVerticalPageBreak(int)
Adds a vertical page break after the given column.
void AddVerticalPageBreak(int column)
Parameters
columnintThe 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
percentageOfNormalSizeintThe 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
SetAlignHFWithMargins()
IXLPageSetup SetAlignHFWithMargins()
Returns
SetAlignHFWithMargins(bool)
IXLPageSetup SetAlignHFWithMargins(bool value)
Parameters
valuebool
Returns
SetBlackAndWhite()
IXLPageSetup SetBlackAndWhite()
Returns
SetBlackAndWhite(bool)
IXLPageSetup SetBlackAndWhite(bool value)
Parameters
valuebool
Returns
SetCenterHorizontally()
IXLPageSetup SetCenterHorizontally()
Returns
SetCenterHorizontally(bool)
IXLPageSetup SetCenterHorizontally(bool value)
Parameters
valuebool
Returns
SetCenterVertically()
IXLPageSetup SetCenterVertically()
Returns
SetCenterVertically(bool)
IXLPageSetup SetCenterVertically(bool value)
Parameters
valuebool
Returns
SetColumnsToRepeatAtLeft(int, int)
Sets the rows to repeat on the left of the printed pages.
void SetColumnsToRepeatAtLeft(int firstColumnToRepeatAtLeft, int lastColumnToRepeatAtLeft)
Parameters
firstColumnToRepeatAtLeftintThe first column to repeat at left.
lastColumnToRepeatAtLeftintThe 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
rangestringThe range of rows to repeat on the left of the printed pages.
SetDifferentFirstPageOnHF()
IXLPageSetup SetDifferentFirstPageOnHF()
Returns
SetDifferentFirstPageOnHF(bool)
IXLPageSetup SetDifferentFirstPageOnHF(bool value)
Parameters
valuebool
Returns
SetDifferentOddEvenPagesOnHF()
IXLPageSetup SetDifferentOddEvenPagesOnHF()
Returns
SetDifferentOddEvenPagesOnHF(bool)
IXLPageSetup SetDifferentOddEvenPagesOnHF(bool value)
Parameters
valuebool
Returns
SetDraftQuality()
IXLPageSetup SetDraftQuality()
Returns
SetDraftQuality(bool)
IXLPageSetup SetDraftQuality(bool value)
Parameters
valuebool
Returns
SetFirstPageNumber(uint?)
IXLPageSetup SetFirstPageNumber(uint? value)
Parameters
valueuint?
Returns
SetHorizontalDpi(int)
IXLPageSetup SetHorizontalDpi(int value)
Parameters
valueint
Returns
SetPageOrder(XLPageOrderValues)
IXLPageSetup SetPageOrder(XLPageOrderValues value)
Parameters
valueXLPageOrderValues
Returns
SetPageOrientation(XLPageOrientation)
IXLPageSetup SetPageOrientation(XLPageOrientation value)
Parameters
valueXLPageOrientation
Returns
SetPagesTall(int)
IXLPageSetup SetPagesTall(int value)
Parameters
valueint
Returns
SetPagesWide(int)
IXLPageSetup SetPagesWide(int value)
Parameters
valueint
Returns
SetPaperSize(XLPaperSize)
IXLPageSetup SetPaperSize(XLPaperSize value)
Parameters
valueXLPaperSize
Returns
SetPrintErrorValue(XLPrintErrorValues)
IXLPageSetup SetPrintErrorValue(XLPrintErrorValues value)
Parameters
valueXLPrintErrorValues
Returns
SetRowsToRepeatAtTop(int, int)
Sets the rows to repeat on the top of the printed pages.
void SetRowsToRepeatAtTop(int firstRowToRepeatAtTop, int lastRowToRepeatAtTop)
Parameters
firstRowToRepeatAtTopintThe first row to repeat at top.
lastRowToRepeatAtTopintThe 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
rangestringThe range of rows to repeat on the top of the printed pages.
SetScale(int)
IXLPageSetup SetScale(int value)
Parameters
valueint
Returns
SetScaleHFWithDocument()
IXLPageSetup SetScaleHFWithDocument()
Returns
SetScaleHFWithDocument(bool)
IXLPageSetup SetScaleHFWithDocument(bool value)
Parameters
valuebool
Returns
SetShowComments(XLShowCommentsValues)
IXLPageSetup SetShowComments(XLShowCommentsValues value)
Parameters
valueXLShowCommentsValues
Returns
SetShowGridlines()
IXLPageSetup SetShowGridlines()
Returns
SetShowGridlines(bool)
IXLPageSetup SetShowGridlines(bool value)
Parameters
valuebool
Returns
SetShowRowAndColumnHeadings()
IXLPageSetup SetShowRowAndColumnHeadings()
Returns
SetShowRowAndColumnHeadings(bool)
IXLPageSetup SetShowRowAndColumnHeadings(bool value)
Parameters
valuebool
Returns
SetVerticalDpi(int)
IXLPageSetup SetVerticalDpi(int value)
Parameters
valueint