Skip to main content

XlHeaderFooter Members

Represents the object that specifies headers and footers of a worksheet.

Constructors

Name Description
XlHeaderFooter() Initializes a new instance of the XlHeaderFooter class with the default settings.

Fields

Name Description
Bold Turns bold on or off for the characters that follows.
BookName Prints the name of the workbook.
BookPath Prints the workbook file path.
Center Centers the characters that follow.
Date Prints the current date.
DoubleUnderline Turns double underline on or off for the characters that follow.
Italic Turns italic on or off for the characters that follow.
Left Left aligns the characters that follow.
PageNumber Prints the current page number.
PageTotal Prints the total number of pages in the document.
Right Right aligns the characters that follow.
SheetName Prints the name of the worksheet.
Strikethrough Turns strikethrough on or off for the characters that follow.
Subscript Turns subscript on or off for the characters that follow.
Superscript Turns superscript on or off for the characters that follow.
Time Prints the current time.
Underline Turns underline on or off for the characters that follow.

Properties

Name Description
AlignWithMargins Gets or sets a value indicating whether the header or footer edges should be aligned with page margins.
DifferentFirst Gets or sets a value indicating whether the first page of the worksheet has unique headers and footers.
DifferentOddEven Gets or sets a value indicating whether the odd-numbered pages have headers and footers different from those on even-numbered pages.
EvenFooter Gets or sets the text to be displayed in the footer of even-numbered pages.
EvenHeader Gets or sets the text to be displayed in the header of even-numbered pages.
FirstFooter Gets or sets the text to be displayed in the footer of the first worksheet page.
FirstHeader Gets or sets the text to be displayed in the header of the first worksheet page.
OddFooter Gets or sets the text to be displayed in the footer of odd-numbered pages.
OddHeader Gets or sets the text to be displayed in the header of odd-numbered pages.
ScaleWithDoc Gets or sets a value indicating whether headers and footers should be scaled proportionately when print scaling is used to fit information on the specified number of pages.

Methods

Name Description
Clear() Removes headers and footers from a worksheet.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
FromLCR(String, String, String) static Specifies the left-aligned, centered and right-aligned text for the header of footer.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
ToString() Returns a string that represents the current object. Inherited from Object.
See Also