Skip to main content
Row

HeaderFooterCode Fields

Contains format codes used in headers and footers.
Name Description
Ampersand Prints a single ampersand.
Bold Turns bold on and off for the text that follows the code.
CenterSection Centers the characters that follow.
Date Prints the current date.
DoubleUnderline Turns double underline on and off for the characters that follow.
Italic Turns italic on and off for the characters that follow.
LeftSection Left aligns the characters that follow.
PageNumber Prints the current page number.
PageTotal Prints the total number of pages in the document.
Picture Inserts a picture. Use the WorksheetHeaderFooter.AddPicture method to load the picture you want to insert.
RightSection Right aligns the characters that follow.
Strikethrough Turns strikethrough on or off for the characters that follow.
Subscript Turns subscript on or off for the characters that follow.
Superscript Turns superscript on or off for the characters that follow.
Time Prints the current time.
Underline Turns underline on or off for the characters that follow.
WorkbookFileName Prints the name of the workbook.
WorkbookFilePath Prints the file path of the workbook.
WorksheetName Prints the name of the worksheet.
See Also