NativeExcel for .Net Developer's Reference

IPageSetup.LeftMargin Property

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

[Visual Basic]
Property LeftMargin As Double
[C#]
double LeftMargin { get; set; }
[C++]
__property double get_LeftMargin();
__property void set_LeftMargin(double );
[JScript]
function get LeftMargin() : double
function set LeftMargin(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;
[Visual Basic]
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