NativeExcel for .Net Developer's Reference

IRange.AddressMethod(Boolean, Boolean, Boolean)

Returns the range reference.

[Visual Basic]
FunctionAddress(_
ByValRowAbsoluteAsBoolean,_
ByValColAbsoluteAsBoolean,_
ByValExternalAsBoolean_
)AsString
[C#]
stringAddress(
boolRowAbsolute,
boolColAbsolute,
boolExternal
);
[C++]
String*Address(
boolRowAbsolute,
boolColAbsolute,
boolExternal
);
[JScript]
functionAddress(
boolRowAbsolute,
boolColAbsolute,
boolExternal
):String;

Parameters

RowAbsolute
True to return the row part of the reference as an absolute reference. The default value is True.
ColAbsolute
True to return the col part of the reference as an absolute reference. The default value is True.
External
True to return an external reference; False to return a local reference.

Return Value

Returns a string.

Example

This example returns the external reference for the used range

[C#]
string ref = book.Worksheets[1].UsedRange.Address(false, false, true);
[VisualBasic]
Dim ref As String = book.Worksheets(1).UsedRange.Address(False, False, True)
[C++]
String^ ref = book->Worksheets->Item[1]->UsedRange->Address(false, false, true);

See Also

IRange Interface | NativeExcel Namespace | IRange.Address Overload List