XmlMappedRange.FormatConditions Özellik
Alır bir FormatConditions Tüm koşullu biçimler için temsil eden koleksiyonu XmlMappedRange Denetim.
Ad alanı: Microsoft.Office.Tools.Excel
Derleme: Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)
Sözdizimi
'Bildirim
ReadOnly Property FormatConditions As FormatConditions
Get
FormatConditions FormatConditions { get; }
Özellik Değeri
Tür: Microsoft.Office.Interop.Excel.FormatConditions
A FormatConditions Tüm koşullu biçimler için temsil eden koleksiyonu XmlMappedRange Denetim.
Örnekler
Aşağıdaki kod örneği FormatConditions yazı tipini değiştirmek için özellik bir XmlMappedRange , değeri XmlMappedRange az değeri hücre A1. Bu kod örneği, geçerli çalışma sayfasının içerdiğini varsayar bir XmlMappedRange adlı CustomerZipCell.
Private Sub ModifyFormatConditions()
Me.Range("A1").Value2 = 99000
Me.CustomerZipCell.Value2 = 98052
' Set conditional formatting to alter the font and interior pattern if
' the CustomerZipCell value is less than the value in A1.
Dim condition1 As Excel.FormatCondition = _
Me.CustomerZipCell.FormatConditions.Add( _
Excel.XlFormatConditionType.xlCellValue, _
Excel.XlFormatConditionOperator.xlLess, "=$a$1")
condition1.Font.Bold = True
condition1.Font.Color = &HFF00
End Sub
private void ModifyFormatConditions()
{
this.Range["A1", missing].Value2 = 99000;
this.CustomerZipCell.Value2 = 98052;
// Set conditional formatting to alter the font and interior pattern if
// the CustomerZipCell value is less than the value in A1.
Excel.FormatCondition condition1 =
(Excel.FormatCondition)this.CustomerZipCell.FormatConditions.Add(
Excel.XlFormatConditionType.xlCellValue,
Excel.XlFormatConditionOperator.xlLess, "=$a$1", missing, missing, missing, missing, missing);
condition1.Font.Bold = true;
condition1.Font.Color = 0xFF00;
}
.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üvenilir kod tarafından Kitaplıklar kullanma.