GetAddress

function GetAddress(
  RowAbs: boolean = null,
  ColAbs: boolean = null,
  RefStyle: string = null,
  External: boolean = null,
  RelativeTo: range = null,
): string | "null"

Description

Returns the range address.

Parameters

RowAbsbooleandefault: null

Defines if the link to the row is absolute or not.

ColAbsbooleandefault: null

Defines if the link to the column is absolute or not.

RefStylestringdefault: null

The reference style.

Externalbooleandefault: null

Defines if the range is in the current file or not.

RelativeTorangedefault: null

The range which the current range is relative to.

Returns

string | "null"

Try It

var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("1");
oWorksheet.GetRange("B1").SetValue("2");
var sAddress = oWorksheet.GetRange("A1").GetAddress(true, true, "xlA1", false);
oWorksheet.GetRange("A3").SetValue("Address: ");
oWorksheet.GetRange("B3").SetValue(sAddress);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).