Get Started
Usage API
More information

SetRightMargin

SetRightMargin(nPoints)

Set the right margin of the sheet.

Parameters:

Name Type Description
nPoints number

The right margin size measured in points.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.SetRightMargin(20.8);
oRightMargin = oWorksheet.GetRightMargin();
oWorksheet.GetRange("A1").SetValue("Right margin: " + oRightMargin + " mm");
builder.SaveFile("xlsx", "SetRightMargin.xlsx");
builder.CloseFile();

Resulting document