Description
Represents the Header/Footer of ExcelWorksheet.

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

Syntax

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

Members

      
 All Members  Properties  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
DefaultString
Gets or sets a default page header/footer value.
EvenPageString
Gets or sets a even page header/footer value.
FirstPageString
Gets or sets a first page header/footer value.
IsDifferentFirst
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.
IsDifferentOddEven
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.

Remarks

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

System..::..Object
  Docs.Excel..::..ExcelHeaderFooter

See Also