Add center-aligned content.
Literal text must go through HeaderFooterBuilder.text so a literal & is escaped.
The format codes and (escaped) text for the center section.
this for chaining.
Add left-aligned content.
Literal text must go through HeaderFooterBuilder.text so a literal & is escaped.
The format codes and (escaped) text for the left section.
this for chaining.
Add right-aligned content.
Literal text must go through HeaderFooterBuilder.text so a literal & is escaped.
The format codes and (escaped) text for the right section.
this for chaining.
StaticboldWrap text in bold toggle (&B...&B).
The text to make bold.
The text wrapped in bold format codes.
StaticcolorStaticdateCurrent date (&D).
The &D format code string.
StaticfileFile name without path (&F).
The &F format code string.
StaticfileFile path (&Z).
The &Z format code string.
StaticfontSet font name (e.g., &"Arial").
The font family name.
The font name format code string.
StaticfontSet font size in points (e.g., &12 for 12pt).
The font size in points, an integer from 1 to 409.
Optionaltext: string
Optional text that follows; a space is inserted when it starts with a digit so the digits are not read as part of the size.
The font size format code string, followed by text when given.
StaticitalicWrap text in italic toggle (&I...&I).
The text to italicize.
The text wrapped in italic format codes.
StaticpageCurrent page number (&P).
The &P format code string.
StaticsheetSheet tab name (&A).
The &A format code string.
StaticstrikethroughWrap text in strikethrough toggle (&S...&S).
The text to strike through.
The text wrapped in strikethrough format codes.
StatictextEscape literal text for embedding in a section (& becomes &&).
The literal text.
The text with every & doubled.
StatictimeCurrent time (&T).
The &T format code string.
StatictotalTotal number of pages (&N).
The &N format code string.
StaticunderlineWrap text in underline toggle (&U...&U).
The text to underline.
The text wrapped in underline format codes.
Fluent builder for Excel header/footer format strings.
Excel headers/footers use special
&-prefixed codes for positioning, dynamic content, and font formatting. This builder provides a type-safe API for constructing these format strings.Example