Udostępnij za pośrednictwem


XmlMappedRange.ClearFormats Method (2007 System)

Clears the formatting of the XmlMappedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Public Function ClearFormats As Object
'Usage
Dim instance As XmlMappedRange 
Dim returnValue As Object 

returnValue = instance.ClearFormats()
public Object ClearFormats()
public:
Object^ ClearFormats()
public function ClearFormats() : Object

Return Value

Type: System.Object

Examples

The following code example uses the BorderAround method to apply a thick border around an XmlMappedRange. The example then prompts the user to clear the border by using the ClearFormats method. This code example assumes that the current worksheet contains an XmlMappedRange named 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, missing);

    if (MessageBox.Show("Clear the border?", "Test",
        MessageBoxButtons.YesNo) == DialogResult.Yes)
    {
        this.CustomerLastNameCell.ClearFormats();
    }
}

.NET Framework Security

See Also

Reference

XmlMappedRange Class

XmlMappedRange Members

Microsoft.Office.Tools.Excel Namespace