Represents the Header/Footer of ExcelWorksheet.

Namespace: Docs.Excel
Assembly: Excel (in Excel.dll) Version: (3.1)


 C#  Visual Basic  Visual C++ 
public class ExcelHeaderFooter
Public Class ExcelHeaderFooter
public ref class ExcelHeaderFooter


 All Members  Properties  



 XNA Framework Only 

 .NET Compact Framework Only 

Gets or sets a default page header/footer value.
Gets or sets a even page header/footer value.
Gets or sets a first page header/footer value.
Gets or sets a different first page header/footer. When true then first header/footer specify first page header/footer values. If false and first header/footer are present, they are ignored.
Gets or sets a different odd and even page headers and footers. When true then odd header/footer and even header/footer specify page header/footer values for odd and even pages. If false then odd header/footer is used, even when header/footer are present.


The header/footer string may contain special commands:

&& The "&" character itself

&L Start of the left section
&C Start of the centred section
&R Start of the right section

&P Current page number
&N Page count
&D Current date
&T Current time
&A Sheet name
&F File name without path
&Z File path without file name

&B Bold on/off
&I Italic on/off
&U Underlining on/off
&E Double underlining on/off
&S Strikeout on/off
&X Superscript on/off
&Y Subscript on/off

&"<fontname>" Sets new font <fontname>

&"<fontname>,<fontstyle>" Set new font with specified style <fontstyle>. The style <fontstyle> is in most cases one of "Regular", "Bold", "Italic", or "Bold Italic". But this setting is dependent on the used font, it may differ (localised style names, or "Standard", "Oblique", ...).

&<fontheight> Sets font height in points (<fontheight> is a decimal value). If this command is followed by a plain number to be printed in the header, it will be separated from the font height with a space character.

Inheritance Hierarchy


See Also