NativeExcel2 for .Net Developer's Reference

IRange.AddressMethod

Returns the range reference.

Overload List

Returns the local range reference.

[Visual Basic] FunctionAddress()AsString
[C#] stringAddress();
[C++] String*Address();
[JScript] functionAddress():String;

Returns the range reference.

[Visual Basic] FunctionAddress(ByValBoolean)AsString
[C#] stringAddress(bool);
[C++] String*Address(bool);
[JScript] functionAddress(bool):String;

Returns the range reference.

[Visual Basic] FunctionAddress(ByValBoolean,ByValBoolean,ByValBoolean)AsString
[C#] stringAddress(bool,bool,bool);
[C++] String*Address(bool,bool,bool);
[JScript] functionAddress(bool,bool,bool):String;

Example

This example gets range reference for the used range.

[C#]
  string ref = book.Worksheets[1].UsedRange.Address();
[VisualBasic]
  Dim ref As String = book.Worksheets(1).UsedRange.Address()
[C++]
String^ ref = book->Worksheets->Item[1]->UsedRange->Address();
This example demostrates the Address method capabilities
[C#]
IRange r = book.Worksheets[1].Range["A2:B4"];
Console.WriteLine(r.Address());
Console.WriteLine(r.Address(true));
Console.WriteLine(r.Address(false, false, true));
Output:
$A$2:$B$4
'Sheet1'!$A$2:$B$4
A2:B4

See Also

IRange Interface | NativeExcel Namespace