This documentation is archived and is not being maintained.

XmlMappedRange.AddressLocal Property (2007 System)

Gets the range reference of the XmlMappedRange control in the language of the user.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

[BrowsableAttribute(false)]
public XmlMappedRange..::._AddressLocalType AddressLocal { get; }

Property Value

Type: Microsoft.Office.Tools.Excel.XmlMappedRange._AddressLocalType
A string that represents the range reference of the XmlMappedRange control in the language of the user and in R1C1-style or A1-style notation.

The AddressLocal property is intended to be used with the following parameters.

Parameter

Description

RowAbsolute

true to return the row as an absolute reference; otherwise, false. The default value is true.

ColumnAbsolute

true to return the column as an absolute reference; otherwise, false. The default value is true.

ReferenceStyle

One of the XlReferenceStyle values.

External

true to return an external reference; false to return a local reference. The default value is false.

RelativeTo

A Range that defines the starting point. If RowAbsolute and ColumnAbsolute are false, and ReferenceStyle is xlR1C1, you must include a starting point for the relative reference.

If you attempt to use AddressLocal without specifying any parameters, AddressLocal will get an XmlMappedRange._AddressLocalType object that is part of the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code.

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

The following code example uses the AddressLocal property to display the range location of an XmlMappedRange. The example uses different combinations of the ReferenceStyle, RowAbsolute, ColumnAbsolute and RelativeTo parameters to display the range location in four different formats. The location strings will be localized according to the language of the system it is run on. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell. If the example is run on a system using German language support and CustomerLastNameCell is at cell A2, the example will display the address strings "$A$2", "$A2", "Z2S2", and "Z[-1]S[-1]".

private void DisplayAddressLocal()
{
    this.Range["A1", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[true,
        true, Excel.XlReferenceStyle.xlA1, false, missing];

    this.Range["A2", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[false,
        true, Excel.XlReferenceStyle.xlA1, false, missing];

    this.Range["A3", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[true,
         true, Excel.XlReferenceStyle.xlR1C1, false, missing];

    this.Range["A4", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[false,
        false, Excel.XlReferenceStyle.xlR1C1, false, this.Cells[3, 3]];
}

Show: