The collection of ExcelHeaderFooterTextItems.
Inheritance
ExcelHeaderFooterTextCollection
Assembly: EPPlus.dll
public class ExcelHeaderFooterTextCollection : IEnumerable<ExcelHeaderFooterTextItem>, IEnumerable
Properties
The number of objects in the collection.
Declaration
public int Count { get; }
Property Value
Returns the ExcelHeaderFooterTextItem at index
Declaration
public ExcelHeaderFooterTextItem this[int index] { get; set; }
Parameters
| Type |
Name |
Description |
| int |
index |
the index of item to return.
|
Property Value
The drawing vml reference to inserted picture.
Declaration
public ExcelVmlDrawingPicture Picture { get; set; }
Property Value
Get the raw text of the collection.
Declaration
public string Text { get; set; }
Property Value
The length of the text of left, center and right header footer fields.
Declaration
public int TextLength { get; }
Property Value
Methods
Add an ExcelHeaderFooterTextItem to the end of the collection.
Declaration
public void Add(ExcelHeaderFooterTextItem textItem)
Parameters
Add the current date to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddCurrentDate()
Returns
Add the current time to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddCurrentTime()
Returns
Add the file name to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddFileName()
Returns
Add the file path to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddFilePath()
Returns
Add a picture to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddImage(FileInfo pictureFile)
Parameters
| Type |
Name |
Description |
| FileInfo |
pictureFile |
The FileInfo object for the picture.
|
Returns
Add the file path to the end of the collection using a stream.
Declaration
public ExcelHeaderFooterTextItem AddImage(Stream pictureStream, ePictureType pictureType)
Parameters
| Type |
Name |
Description |
| Stream |
pictureStream |
The picture stream.
|
| ePictureType |
pictureType |
The file type of the picture.
|
Returns
Add the number of pages to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddNumberOfPages()
Returns
Add the page number to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddPageNumber(int number = 0)
Parameters
| Type |
Name |
Description |
| int |
number |
Amount to offset the page number with. Default is 0.
|
Returns
Add the sheet name to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddSheetName()
Returns
Add a string to the end of the collection.
Declaration
public ExcelHeaderFooterTextItem AddText(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
|
Returns
Declaration
Insert an ExcelHeaderFooterTextItem at specified position in the collection.
Declaration
public void Insert(int index, ExcelHeaderFooterTextItem item)
Parameters
Exceptions
Insert the current date at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertCurrentDate(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
Insert the current time at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertCurrentTime(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
Insert the file name at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertFileName(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
Insert the file path at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertFilePath(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
Insert a picture at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertImage(int index, FileInfo pictureFile)
Parameters
Returns
Insert a picture at specified position in the collection using a stream.
Declaration
public ExcelHeaderFooterTextItem InsertImage(int index, Stream pictureStream, ePictureType pictureType)
Parameters
| Type |
Name |
Description |
| int |
index |
|
| Stream |
pictureStream |
|
| ePictureType |
pictureType |
|
Returns
Insert the number of pages at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertNumberOfPages(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
Insert the page number at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertPageNumber(int index, int number = 0)
Parameters
| Type |
Name |
Description |
| int |
index |
|
| int |
number |
|
Returns
Insert the sheet name at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertSheetName(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
Insert a string at specified position in the collection.
Declaration
public ExcelHeaderFooterTextItem InsertText(int index, string text)
Parameters
Returns
Exceptions
Remove the specified item from the collection.
Declaration
public void Remove(ExcelHeaderFooterTextItem item)
Parameters
Remove the specified item at index in collection.
Declaration
public void RemoveAt(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Remove the picture from the header or footer.
Declaration
public void RemovePicture()
Implements