NamedRange.EntireColumn Özellik
Alır bir Microsoft.Office.Interop.Excel.Range içeren tüm sütun (veya sütunlar) temsil eden NamedRange denetim.
Ad alanı: Microsoft.Office.Tools.Excel
Derleme: Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)
Sözdizimi
'Bildirim
ReadOnly Property EntireColumn As Range
Range EntireColumn { get; }
Özellik Değeri
Tür: Microsoft.Office.Interop.Excel.Range
A Microsoft.Office.Interop.Excel.Range içeren tüm sütun (veya sütunlar) temsil eden NamedRange denetim.
Örnekler
Aşağıdaki kod örneği oluşturur bir NamedRange ve sonra sütunları ve satırları içeren kenarlık rengini ayarlar NamedRange yeşil.
Bu örnek için belge düzeyi özelleştirmesinde içindir.
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;
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.