Class ExcelHeaderFooter
Represents the Header and Footer on an Excel Worksheet
Inherited Members
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public sealed class ExcelHeaderFooter : XmlHelper
Fields
CurrentDate
The code for "date"
Declaration
public const string CurrentDate = "&D"
Field Value
| Type | Description |
|---|---|
| System.String |
CurrentTime
The code for "time"
Declaration
public const string CurrentTime = "&T"
Field Value
| Type | Description |
|---|---|
| System.String |
FileName
The code for "this workbook's file name"
Declaration
public const string FileName = "&F"
Field Value
| Type | Description |
|---|---|
| System.String |
FilePath
The code for "this workbook's file path"
Declaration
public const string FilePath = "&Z"
Field Value
| Type | Description |
|---|---|
| System.String |
FontColor
The code for "text font color" RGB Color is specified as RRGGBB Theme Color is specified as TTSNN where TT is the theme color Id, S is either "+" or "-" of the tint/shade value, NN is the tint/shade value.
Declaration
public const string FontColor = "&K"
Field Value
| Type | Description |
|---|---|
| System.String |
Image
The code for "picture as background"
Declaration
public const string Image = "&G"
Field Value
| Type | Description |
|---|---|
| System.String |
NumberOfPages
The code for "total pages"
Declaration
public const string NumberOfPages = "&N"
Field Value
| Type | Description |
|---|---|
| System.String |
OutlineStyle
The code for "outline style"
Declaration
public const string OutlineStyle = "&O"
Field Value
| Type | Description |
|---|---|
| System.String |
PageNumber
The code for "current page #"
Declaration
public const string PageNumber = "&P"
Field Value
| Type | Description |
|---|---|
| System.String |
ShadowStyle
The code for "shadow style"
Declaration
public const string ShadowStyle = "&H"
Field Value
| Type | Description |
|---|---|
| System.String |
SheetName
The code for "sheet tab name"
Declaration
public const string SheetName = "&A"
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
AlignWithMargins
Align with page margins
Declaration
public bool AlignWithMargins { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
differentFirst
Display different headers and footers on the first page of the worksheet.
Declaration
public bool differentFirst { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
differentOddEven
Displas different headers and footers on odd and even pages.
Declaration
public bool differentOddEven { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
EvenFooter
Provides access to the footer on even numbered pages of the document.
Declaration
public ExcelHeaderFooterText EvenFooter { get; }
Property Value
| Type | Description |
|---|---|
| ExcelHeaderFooterText |
EvenHeader
Provides access to the header on even numbered pages of the document.
Declaration
public ExcelHeaderFooterText EvenHeader { get; }
Property Value
| Type | Description |
|---|---|
| ExcelHeaderFooterText |
FirstFooter
Provides access to the footer on the first page of the document.
Declaration
public ExcelHeaderFooterText FirstFooter { get; }
Property Value
| Type | Description |
|---|---|
| ExcelHeaderFooterText |
FirstHeader
Provides access to the header on the first page of the document.
Declaration
public ExcelHeaderFooterText FirstHeader { get; }
Property Value
| Type | Description |
|---|---|
| ExcelHeaderFooterText |
OddFooter
Provides access to the footer on odd numbered pages of the document. If you want the same footer on both odd and even pages, then only set values in this ExcelHeaderFooterText class.
Declaration
public ExcelHeaderFooterText OddFooter { get; }
Property Value
| Type | Description |
|---|---|
| ExcelHeaderFooterText |
OddHeader
Provides access to the header on odd numbered pages of the document. If you want the same header on both odd and even pages, then only set values in this ExcelHeaderFooterText class.
Declaration
public ExcelHeaderFooterText OddHeader { get; }
Property Value
| Type | Description |
|---|---|
| ExcelHeaderFooterText |
Pictures
Vml drawings. Underlaying object for Header footer images
Declaration
public ExcelVmlDrawingPictureCollection Pictures { get; }
Property Value
| Type | Description |
|---|---|
| ExcelVmlDrawingPictureCollection |
ScaleWithDocument
The header and footer should scale as you use the ShrinkToFit property on the document
Declaration
public bool ScaleWithDocument { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |