NamedRange.EntireRow (Propiedad)
Obtiene un objeto Microsoft.Office.Interop.Excel.Range que representa todas las filas que contiene el control NamedRange.
Espacio de nombres: Microsoft.Office.Tools.Excel
Ensamblado: Microsoft.Office.Tools.Excel (en Microsoft.Office.Tools.Excel.dll)
Sintaxis
'Declaración
ReadOnly Property EntireRow As Range
Get
Range EntireRow { get; }
Valor de propiedad
Tipo: Microsoft.Office.Interop.Excel.Range
Objeto Microsoft.Office.Interop.Excel.Range que representa todas las filas que contiene el control NamedRange.
Ejemplos
En el ejemplo de código siguiente se crea NamedRange y, a continuación, se establece el color del borde de las columnas y filas que contienen el NamedRange en verde.
Se trata de un ejemplo para una personalización en el nivel del 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;
}
Seguridad de .NET Framework
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.