Get Started
Usage API
More information

GetTopMargin

GetTopMargin() → { number }

Get the top margin of the sheet.

Parameters:

This method doesn't have any parameters.

Returns:

Type
number

Example

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

Resulting document