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