SetHeaderAndFooter procedure
Prototype: |
procedure SetHeaderAndFooter( const HeaderLeft,HeaderCenter,HeaderRight :string; const FooterLeft,FooterCenter,FooterRight :string); |
|
Description: |
Sets page footer on the active sheet (the same footer for the all the pages). By default, page number is printed as FooterCenter. Special codes can be included as a part of the footer to specify options or to insert specific elements. Page number is printed automatically as footer center if empty string ( ' ' ) is used as FooterCenter. |
|
Syntax: |
xls.SetHeaderAndFooter( HeaderLeft,HeaderCenter,HeaderRight,FooterLeft,FooterCenter,FooterRight); |
|
Part |
Description |
|
xls |
Variable declared as an instance of the TExcelWrapper class |
|
HeaderLeft, HeaderCenter, HeaderRight |
Variables declared as string that contain the text for the left, center and right section of the header |
|
FooterLeft, FooterCenter, FooterRight |
Variables declared as string that contain the text for the left, center and right section of the footer |
|
Return value: |
none |
|
See also:
Landscape , SetPrintMargins , SetHeader , SetFooter , SetHeaderAndFooter , SetFirstHeaderAndFooter , SetTitleRows , SetTitleRowsAndCols , InsertHPageBreak , InsertVPageBreak , CreateHeaderOfTableContent , CreateTableOfContent , AddBackToTableOfContent , SetPrintArea , RowCount , ColCount , Header and footer codes , Predefined paper sizes, KeepColsTogether, KeepRowsTogether, AutoPageBreaks, PrintNumberOfHorizontalPages, PrintNumberOfVerticalPages, PrintToFit, Complex example
Example:
Var
Row, Rows, Cols:integer;
xls :TExcelWrapper;
Begin
{document preparation}
//...
{managing worksheets}
//...
{header and footer}
xls.SetHeaderAndFooter('&"Calibri,Italic"&9My left header','','My right header','My left footer','','&"Calibri,Italic"&9My right footer');
{setting cell values}
//...
{document saving / previewing}
//...
End.
Soo also complex header and footer example.
© 2024 IFER-Monitoring and Mapping Solutions