XmlMappedRange.ClearFormats Yöntem
Biçimlendirmesini temizler XmlMappedRange denetim.
Ad alanı: Microsoft.Office.Tools.Excel
Derleme: Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)
Sözdizimi
'Bildirim
Function ClearFormats As Object
Object ClearFormats()
Dönüş Değeri
Tür: System.Object
Örnekler
Aşağıdaki kod örneğinde BorderAround kalın çevresine kenarlık uygulamak için yöntem bir XmlMappedRange.Örnek daha sonra kenarlığı temizlemek ister ClearFormats yöntem.Bu kod örneği, geçerli çalışma sayfasının içerdiğini varsayar bir XmlMappedRange adlı CustomerLastNameCell.
Private Sub SetBorder()
Me.CustomerLastNameCell.BorderAround( _
Weight:=Excel.XlBorderWeight.xlThick, _
ColorIndex:=Excel.XlColorIndex.xlColorIndexAutomatic)
If MessageBox.Show("Clear the border?", "Test", MessageBoxButtons.YesNo) = _
DialogResult.Yes Then
Me.CustomerLastNameCell.ClearFormats()
End If
End Sub
private void SetBorder()
{
this.CustomerLastNameCell.BorderAround(missing,
Excel.XlBorderWeight.xlThick,
Excel.XlColorIndex.xlColorIndexAutomatic);
if (MessageBox.Show("Clear the border?", "Test",
MessageBoxButtons.YesNo) == DialogResult.Yes)
{
this.CustomerLastNameCell.ClearFormats();
}
}
.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.