NativeExcel for .Net Developer's Reference

IPageSetup.LeftMargin Property

Gets or sets the size of the left margin, in inches.

[Visual Basic]
PropertyLeftMarginAsDouble
[C#]
doubleLeftMargin{get;set;}
[C++]
__propertydoubleget_LeftMargin();
__propertyvoidset_LeftMargin(double);
[JScript]
functiongetLeftMargin():double
functionsetLeftMargin(double);

Property Value

Double. Size of the left margin, in inches.

Example

This example set the left margin of sheet one to 1/2 inches.

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

See Also

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