Get Started
Usage API

SetTopMargin

SetTopMargin(nPoints)

Set top margin sheet

Parameters:

Name Type Description
nPoints number

in points.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.SetTopMargin(25.1);
oTopMargin = oWorksheet.GetTopMargin();
oWorksheet.GetRange("A1").SetValue("Top margin: " + oTopMargin + " mm");
builder.SaveFile("xlsx", "SetTopMargin.xlsx");
builder.CloseFile();

Resulting document