The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

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

Declaration

public interface WorksheetHeaderFooterOptions
Public Interface WorksheetHeaderFooterOptions
public interface WorksheetHeaderFooterOptions
Public Interface WorksheetHeaderFooterOptions

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