Class ExcelHeaderFooterTextCollection¶
Namespace: OfficeOpenXml.Style.HeaderFooterTextFormat
Assembly: EPPlus.dll
The collection of ExcelHeaderFooterTextItems.
Inheritance¶
object ← ExcelHeaderFooterTextCollection
Implements¶
IEnumerable
IEnumerable<ExcelHeaderFooterTextItem>
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
Count¶
The number of objects in the collection.
Property Value¶
Picture¶
The drawing vml reference to inserted picture.
Property Value¶
Text¶
Get the raw text of the collection.
Property Value¶
TextLength¶
The length of the text of left, center and right header footer fields.
Property Value¶
this[int]¶
Returns the ExcelHeaderFooterTextItem at index
Property Value¶
Methods¶
Add(ExcelHeaderFooterTextItem)¶
Add an ExcelHeaderFooterTextItem to the end of the collection.
Parameters¶
textItem ExcelHeaderFooterTextItem
AddCurrentDate()¶
Add the current date to the end of the collection.
Returns¶
AddCurrentTime()¶
Add the current time to the end of the collection.
Returns¶
AddFileName()¶
Add the file name to the end of the collection.
Returns¶
AddFilePath()¶
Add the file path to the end of the collection.
Returns¶
AddImage(FileInfo)¶
Add a picture to the end of the collection.
Parameters¶
pictureFile FileInfo
The FileInfo object for the picture.
Returns¶
AddImage(Stream, ePictureType)¶
Add the file path to the end of the collection using a stream.
Parameters¶
pictureStream Stream
The picture stream.
pictureType ePictureType
The file type of the picture.
Returns¶
AddNumberOfPages()¶
Add the number of pages to the end of the collection.
Returns¶
AddPageNumber(int)¶
Add the page number to the end of the collection.
Parameters¶
number int
Amount to offset the page number with. Default is 0.
Returns¶
AddSheetName()¶
Add the sheet name to the end of the collection.
Returns¶
AddText(string)¶
Add a string to the end of the collection.
Parameters¶
text string
Returns¶
Clear()¶
Clear the collection.
Insert(int, ExcelHeaderFooterTextItem)¶
Insert an ExcelHeaderFooterTextItem at specified position in the collection.
Parameters¶
index int
item ExcelHeaderFooterTextItem
Exceptions¶
InsertCurrentDate(int)¶
Insert the current date at specified position in the collection.
Parameters¶
index int
Returns¶
InsertCurrentTime(int)¶
Insert the current time at specified position in the collection.
Parameters¶
index int
Returns¶
InsertFileName(int)¶
Insert the file name at specified position in the collection.
Parameters¶
index int
Returns¶
InsertFilePath(int)¶
Insert the file path at specified position in the collection.
Parameters¶
index int
Returns¶
InsertImage(int, FileInfo)¶
Insert a picture at specified position in the collection.
Parameters¶
index int
pictureFile FileInfo
Returns¶
InsertImage(int, Stream, ePictureType)¶
Insert a picture at specified position in the collection using a stream.
public ExcelHeaderFooterTextItem InsertImage(int index, Stream pictureStream, ePictureType pictureType)
Parameters¶
index int
pictureStream Stream
pictureType ePictureType
Returns¶
InsertNumberOfPages(int)¶
Insert the number of pages at specified position in the collection.
Parameters¶
index int
Returns¶
InsertPageNumber(int, int)¶
Insert the page number at specified position in the collection.
Parameters¶
index int
number int
Returns¶
InsertSheetName(int)¶
Insert the sheet name at specified position in the collection.
Parameters¶
index int
Returns¶
InsertText(int, string)¶
Insert a string at specified position in the collection.
Parameters¶
index int
text string
Returns¶
Exceptions¶
Remove(ExcelHeaderFooterTextItem)¶
Remove the specified item from the collection.
Parameters¶
item ExcelHeaderFooterTextItem
RemoveAt(int)¶
Remove the specified item at index in collection.
Parameters¶
index int
RemovePicture()¶
Remove the picture from the header or footer.