Get Started
Usage API
More information

GetSelection

GetSelection() → { ApiRange }

Return 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();
Api.GetSelection().SetValue("selected");
builder.SaveFile("xlsx", "GetSelection.xlsx");
builder.CloseFile();

Resulting document