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

WorksheetHeaderFooter Interface

A header or footer of the worksheet.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.1.Core.dll


public interface WorksheetHeaderFooter
Public Interface WorksheetHeaderFooter


Use the Worksheet.HeaderFooterOptions to get access to the WorksheetHeaderFooterOptions instance. Its properties, such as the WorksheetHeaderFooterOptions.FirstHeader, WorksheetHeaderFooterOptions.OddHeader, WorksheetHeaderFooterOptions.EvenHeader etc., provide access to the corresponding WorksheetHeaderFooter instance.

The WorksheetHeaderFooterOptions.DifferentFirst and the WorksheetHeaderFooterOptions.DifferentOddEven properties determine which headers and footers are actually displayed and printed. Headers and footers for odd pages are displayed if both the first and even headers and footers are identical.

To specify header or footer content, you can use the WorksheetHeaderFooter.FromString or the WorksheetHeaderFooter.FromLCR methods. When composing the string to pass to these methods, you can use format codes to change the font name, text color, font style or insert current date, time, page number etc. The codes can be obtained as static properties of the HeaderFooterCode class.

See Also