Gets or sets the distance from the top of the page to the header, in inches.
[Visual Basic] Property HeaderMargin As Double [C#] double HeaderMargin { get; set; } [C++] __property double get_HeaderMargin(); __property void set_HeaderMargin(double ); [JScript] function get HeaderMargin() : double function set HeaderMargin(double);
Double. Distance from the top of the page to the header, in inches.
This example sets the header margin of sheet one to 1/2 inches.
[C#]
book.Worksheets[1].PageSetup.HeaderMargin = 0.5;
[Visual Basic]
book.Worksheets(1).PageSetup.HeaderMargin = 0.5
[C++]
book->Worksheets->Item[1]->PageSetup->HeaderMargin = 0.5;
IPageSetup Interface | NativeExcel Namespace | FooterMargin | BottomMargin | TopMargin | LeftMargin | RightMargin | PageSetup Property