HeaderFooterSection Class
Represents HeaderFooter section.
- Inheritance:
- System.ObjectHeaderFooterSection
Constructors
HeaderFooterSection()
HeaderFooterSection constructor.
Properties
Content
Gets or sets HeaderFooter section content.
Property Value
- System.String
Remarks
The header string may contain special commands, for example placeholders for the page number, current date, or text formatting attributes. These fields are represented by single letters (exception: font name and size) with a leading ampersand. If the ampersand is part of the regular header text, it will be duplicated.
For more information consult Microsoft Excel documentation.
Methods
Append(HeaderFooterFieldType)
Appends special header/footer field to Content.
public HeaderFooterSection Append(HeaderFooterFieldType fieldType)
Public Function Append(fieldType As HeaderFooterFieldType) As HeaderFooterSection
Parameters
fieldType
- HeaderFooterFieldType
Special Header/Footer field.
Returns
A reference to this instance after the append operation has completed.
Append(HeaderFooterFieldType, ExcelFont)
Appends special header/footer field to Content.
public HeaderFooterSection Append(HeaderFooterFieldType fieldType, ExcelFont font)
Public Function Append(fieldType As HeaderFooterFieldType, font As ExcelFont) As HeaderFooterSection
Parameters
fieldType
- HeaderFooterFieldType
Special Header/Footer field.
Returns
A reference to this instance after the append operation has completed.
Append(String)
Appends text to Content.
public HeaderFooterSection Append(string text)
Public Function Append(text As String) As HeaderFooterSection
Parameters
text
- System.String
Text to append.
Returns
A reference to this instance after the append operation has completed.
Append(String, ExcelFont)
Appends text to Content.
public HeaderFooterSection Append(string text, ExcelFont font)
Public Function Append(text As String, font As ExcelFont) As HeaderFooterSection
Parameters
text
- System.String
Text to append.
Returns
A reference to this instance after the append operation has completed.
AppendPicture(MemoryStream, ExcelPictureFormat)
Appends picture to this HeaderFooterSection instance.
public HeaderFooterSection AppendPicture(MemoryStream pictureStream, ExcelPictureFormat imageFormat)
Public Function AppendPicture(pictureStream As MemoryStream, imageFormat As ExcelPictureFormat) As HeaderFooterSection
Parameters
pictureStream
- System.IO.MemoryStream
Stream of the picture to be added.
imageFormat
- ExcelPictureFormat
Picture format.
Returns
A reference to this instance after the append operation has completed.
AppendPicture(MemoryStream, ExcelPictureFormat, Int32, Int32)
Appends picture to this HeaderFooterSection instance.
public HeaderFooterSection AppendPicture(MemoryStream pictureStream, ExcelPictureFormat imageFormat, int width, int height)
Public Function AppendPicture(pictureStream As MemoryStream, imageFormat As ExcelPictureFormat, width As Integer, height As Integer) As HeaderFooterSection
Parameters
pictureStream
- System.IO.MemoryStream
Stream of the picture to be added.
imageFormat
- ExcelPictureFormat
Picture format.
width
- System.Int32
Picture width (in pixels).
height
- System.Int32
Picture height (in pixels).
Returns
A reference to this instance after the append operation has completed.
AppendPicture(String)
Appends picture to this HeaderFooterSection instance.
public HeaderFooterSection AppendPicture(string fileName)
Public Function AppendPicture(fileName As String) As HeaderFooterSection
Parameters
fileName
- System.String
The fileName of the file that contains picture.
Returns
A reference to this instance after the append operation has completed.
AppendPicture(String, Int32, Int32)
Appends picture to this HeaderFooterSection instance.
public HeaderFooterSection AppendPicture(string fileName, int width, int height)
Public Function AppendPicture(fileName As String, width As Integer, height As Integer) As HeaderFooterSection
Parameters
fileName
- System.String
The fileName of the file that contains picture.
width
- System.Int32
Picture width (in pixels).
height
- System.Int32
Picture height (in pixels).
Returns
A reference to this instance after the append operation has completed.