GetActiveCell

GetActiveCell() → { ApiRange }

Returns an object that represents an active cell.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiRange

Example

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

Resulting document