Skip to main content

GetLocation

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

Syntax

expression.GetLocation();

expression - A variable that represents a ApiFreezePanes class.

Parameters

This method doesn't have any parameters.

Returns

ApiRange | null

Example

This example freezes first column and get pastes a freezed range address into the table.

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());