Skip to content

Class ExcelHeaderFooterText

Namespace: OfficeOpenXml
Assembly: EPPlus.dll

Print header and footer

public class ExcelHeaderFooterText

Inheritance

object ← ExcelHeaderFooterText

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

Centered

The text collection of the centered part of the header or footer.

public ExcelHeaderFooterTextCollection Centered { get; }

Property Value

ExcelHeaderFooterTextCollection

CenteredText

Get/set the text to appear in the center of the header (or footer) on the worksheet.

public string CenteredText { get; set; }

Property Value

string

LeftAligned

The text collection of the left part of the header or footer.

public ExcelHeaderFooterTextCollection LeftAligned { get; }

Property Value

ExcelHeaderFooterTextCollection

LeftAlignedText

Get/set the text to appear on the left hand side of the header (or footer) on the worksheet.

public string LeftAlignedText { get; set; }

Property Value

string

RightAligned

The text collection of the right part of the header or footer.

public ExcelHeaderFooterTextCollection RightAligned { get; }

Property Value

ExcelHeaderFooterTextCollection

RightAlignedText

Get/set the text to appear on the right hand side of the header (or footer) on the worksheet.

public string RightAlignedText { get; set; }

Property Value

string

Methods

InsertPicture(FileInfo, PictureAlignment)

Inserts a picture at the end of the text in the header or footer

public ExcelVmlDrawingPicture InsertPicture(FileInfo PictureFile, PictureAlignment Alignment)

Parameters

PictureFile FileInfo

The image object containing the Picture

Alignment PictureAlignment

Alignment. The image object will be inserted at the end of the Text.

Returns

ExcelVmlDrawingPicture

InsertPicture(Stream, ePictureType, PictureAlignment)

Inserts a picture at the end of the text in the header or footer

public ExcelVmlDrawingPicture InsertPicture(Stream PictureStream, ePictureType pictureType, PictureAlignment Alignment)

Parameters

PictureStream Stream

The stream containing the picture

pictureType ePictureType

The image format of the picture stream

Alignment PictureAlignment

Alignment. The image object will be inserted at the end of the Text.

Returns

ExcelVmlDrawingPicture

RemoveImage(ExcelVmlDrawingPicture)

Remove the specified item from the collection.

public void RemoveImage(ExcelVmlDrawingPicture item)

Parameters

item ExcelVmlDrawingPicture

The item to remove.