TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetLocation

GetLocation() → { ApiRange | null }

Returns a range that describes the frozen cells in the active worksheet view.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiRange | null

Example

Copy code
builder.CreateFile("xlsx");
Api.SetFreezePanesType("column");
var oWorksheet = Api.GetActiveSheet();
var oFreezePanes = oWorksheet.GetFreezePanes();
var oRange = oFreezePanes.GetLocation();
oWorksheet.GetRange("A1").SetValue("Location: ");
oWorksheet.GetRange("B1").SetValue(oRange.GetAddress());
builder.SaveFile("xlsx", "GetLocation.xlsx");
builder.CloseFile();

Resulting document