Get Started
Documentation

GetSelection

GetSelection() → { ApiRange }

Returns an object that represents the selection range

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiRange

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.GetSelection().SetValue("selected");
builder.SaveFile("xlsx", "GetSelection.xlsx");
builder.CloseFile();

Resulting document