'Declaration Public Property Header As System.String
public System.string Header {get; set;}
'Declaration Public Property Header As System.String
public System.string Header {get; set;}
The header string may contain special commands, i.e. placeholders for the page number, current date, or text formatting attributes. Most of these fields are represented by single letters with a leading ampersand ("&").
The page header is divided into 3 sections: left, center, and right. Each section is introduced by a special command ("&L", "&C", and "&R"). All text and all commands following are part of the selected section.
The following commands are available:
&L Start of the left section
&C Start of the centered section
&R Start of the right section
&P Current page number
&N Page count
&D Current date
&T Current time
&A Sheet name
&F File name without path
&Z File path without file name
&G Picture (file name)
&B Bold toggle
&I Italic toggle
&U Underline toggle
&E Double underline toggle
&S Strikeout toggle
&X Superscript toggle
&Y Subscript toggle
&"[FontName]" Set new font
&"[FontName,FontStyle]" Set new font with specified style. The style is in most cases "Regular", "Bold", "Italic", or "Bold Italic".
&[fontheight] Set font height in points.PrintSettings ps = sheet.PrintSettings;
ps.Header = "&LHeader Left&CHeader Center&RHeader Right";