.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.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.2.Core.dll

Declaration

public interface WorksheetHeaderFooterOptions
Public Interface WorksheetHeaderFooterOptions
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