Skip to main content

SetLeftMargin

Sets the left margin of the sheet.

Syntax

expression.SetLeftMargin(nPoints);

expression - A variable that represents a ApiWorksheet class.

Parameters

NameRequired/OptionalData typeDefaultDescription
nPointsRequirednumberThe left margin size measured in points.

Returns

This method doesn't return any data.

Example

This example sets the left margin of the sheet.

let worksheet = Api.GetActiveSheet();
worksheet.SetLeftMargin(20.8);
let leftMargin = worksheet.GetLeftMargin();
worksheet.GetRange("A1").SetValue("Left margin: " + leftMargin + " mm");