NativeExcel for .Net Developer's Reference

IRange.Address Method (Boolean, Boolean, Boolean)

Returns the range reference.

[Visual Basic]
Function Address( _ 
   ByVal RowAbsolute As Boolean, _ 
   ByVal ColAbsolute As Boolean, _ 
   ByVal External As Boolean _ 
) As String
[C#]
string Address(
   bool RowAbsolute,
   bool ColAbsolute,
   bool External
);
[C++]
String* Address(
   bool RowAbsolute,
   bool ColAbsolute,
   bool External
);
[JScript]
function Address(
   bool RowAbsolute,
   bool ColAbsolute,
   bool External
): 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);
[Visual Basic]
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