Get Started
Usage API
More information

GetActiveCell

GetActiveCell() → { ApiRange }

Return an object that represents the active cell.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiRange

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oActiveCell = oWorksheet.GetActiveCell();
oActiveCell.SetValue("This sample text was placed in an active cell.");
builder.SaveFile("xlsx", "GetActiveCell.xlsx");
builder.CloseFile();

Resulting document