.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

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.v20.1.Core.dll


public interface WorksheetHeaderFooterOptions
Public Interface WorksheetHeaderFooterOptions


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