Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

NamedRange.Row Property

Gets the number of the first row of the first area in the NamedRange control.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public int Row { get; }

Property Value

The number of the first row of the first area in the NamedRange control.

The following code example creates a NamedRange and uses the Column and Row properties to display the numbers of the first column and row in the NamedRange.

Microsoft.Office.Tools.Excel.NamedRange columnAndRowRange;
private void DisplayColumnAndRow()
{
    columnAndRowRange = this.Controls.AddNamedRange(
        this.Range["A3", "D6"], "columnAndRowRange");
    MessageBox.Show("The first column in the range is column " +
        this.columnAndRowRange.Column.ToString() + 
        " and the first row is " +
        this.columnAndRowRange.Row.ToString());
}

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.