Get Started
Usage API
More information

SetLeftMargin

SetLeftMargin(nPoints)

Set the left margin of the sheet.

Parameters:

Name Type Description
nPoints number

The left margin size measured in points.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.SetLeftMargin(20.8);
oLeftMargin = oWorksheet.GetLeftMargin();
oWorksheet.GetRange("A1").SetValue("Left margin: " + oLeftMargin + " mm");
builder.SaveFile("xlsx", "SetLeftMargin.xlsx");
builder.CloseFile();

Resulting document