Proprietà NamedRange.EntireRow

Ottiene un oggetto Microsoft.Office.Interop.Excel.Range che rappresenta l'intera riga (o più righe) che contiene il controllo NamedRange.

Spazio dei nomi:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Sintassi

'Dichiarazione
ReadOnly Property EntireRow As Range
    Get
Range EntireRow { get; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Excel.Range
Oggetto Microsoft.Office.Interop.Excel.Range che rappresenta l'intera riga (o più righe) che contiene il controllo NamedRange.

Esempi

Nell'esempio di codice riportato di seguito viene creato un controllo NamedRange, quindi viene impostato su verde il colore del bordo delle colonne e delle righe che contengono il controllo NamedRange.

Questo esempio è valido per una personalizzazione a livello di documento.

Private entireRowAndColumnRange As Microsoft.Office.Tools.Excel.NamedRange

Private Sub HighlightColumnAndRow()
    entireRowAndColumnRange = Me.Controls.AddNamedRange( _
        Me.Range("C3", "E5"), "entireRowAndColumnRange")

    ' Set the style of the column and row borders to xlSlantDashDot.
    Me.entireRowAndColumnRange.EntireColumn.Borders.LineStyle = _
        Excel.XlLineStyle.xlSlantDashDot
    Me.entireRowAndColumnRange.EntireRow.Borders.LineStyle = _
        Excel.XlLineStyle.xlSlantDashDot
End Sub
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;
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

NamedRange Interfaccia

Spazio dei nomi Microsoft.Office.Tools.Excel