Expand Minimize

NamedRange.EntireRow Property

Gets a Microsoft.Office.Interop.Excel.Range that represents the entire row (or rows) that contains the NamedRange control.

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

Range EntireRow { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Range
A Microsoft.Office.Interop.Excel.Range that represents the entire row (or rows) that contains the NamedRange control.

The following code example creates a NamedRange and then sets the border color of the columns and rows that contain the NamedRange to green.

This example is for a document-level customization.


Microsoft.Office.Tools.Excel.NamedRange entireRowAndColumnRange;
private void HighlightColumnAndRow()
{
    entireRowAndColumnRange = this.Controls.AddNamedRange(
        this.Range["C3", "E5"], "entireRowAndColumnRange");

    // Set the style of the column and row borders to xlSlantDashDot.
    this.entireRowAndColumnRange.EntireColumn.Borders.LineStyle = 
        Excel.XlLineStyle.xlSlantDashDot;
    this.entireRowAndColumnRange.EntireRow.Borders.LineStyle = 
        Excel.XlLineStyle.xlSlantDashDot;
}


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft