NativeExcel2 for .Net Developer's Reference

IPageSetup.HeaderMargin Property

Gets or sets the distance from the top of the page to the header, in inches.

[Visual Basic]
PropertyHeaderMarginAsDouble
[C#]
doubleHeaderMargin{get;set;}
[C++]
__propertydoubleget_HeaderMargin();
__propertyvoidset_HeaderMargin(double);
[JScript]
functiongetHeaderMargin():double
functionsetHeaderMargin(double);

Property Value

Double. Distance from the top of the page to the header, in inches.

Example

This example sets the header margin of sheet one to 1/2 inches.

[C#]
book.Worksheets[1].PageSetup.HeaderMargin = 0.5;
[VisualBasic]
book.Worksheets(1).PageSetup.HeaderMargin = 0.5
[C++]
book->Worksheets->Item[1]->PageSetup->HeaderMargin = 0.5;

See Also

IPageSetup Interface | NativeExcel Namespace | FooterMargin | BottomMargin | TopMargin | LeftMargin | RightMargin | PageSetup Property