WorksheetHeaderFooterOptions Interface
Provides access to the document’s header and footer and contains options for displaying and printing them.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v18.2.Core.dll
Declaration
Related API Members
The following members return WorksheetHeaderFooterOptions objects:
Remarks
The WorksheetHeaderFooterOptions instance is accessible by using the Worksheet.HeaderFooterOptions property.
The following code inserts the workbook path, the name of the worksheet and the page indicator in the footer.
using DevExpress.Spreadsheet;
// ...
Worksheet worksheet = spreadsheetControl1.Document.Worksheets[0];
WorksheetHeaderFooterOptions options = worksheet.HeaderFooterOptions;
options.DifferentFirst = true;
options.FirstFooter.Right = string.Format("Page {0} of {1}", HeaderFooterCode.PageNumber, HeaderFooterCode.PageTotal);
options.FirstFooter.Center = HeaderFooterCode.WorksheetName;
options.FirstFooter.Left = HeaderFooterCode.WorkbookFilePath + HeaderFooterCode.WorkbookFileName;
See Also