XmlMappedRange.ClearFormats, méthode
Efface la mise en forme du contrôle XmlMappedRange.
Espace de noms : Microsoft.Office.Tools.Excel
Assembly : Microsoft.Office.Tools.Excel (dans Microsoft.Office.Tools.Excel.dll)
Syntaxe
'Déclaration
Function ClearFormats As Object
Object ClearFormats()
Valeur de retour
Type : System.Object
Exemples
L'exemple de code suivant utilise la méthode BorderAround pour appliquer une bordure épaisse autour de XmlMappedRange. L'exemple invite ensuite l'utilisateur à effacer la bordure à l'aide la méthode ClearFormats. Cet exemple de code suppose que la feuille de calcul active contient un contrôle XmlMappedRange nommé 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();
}
}
Sécurité .NET Framework
- Confiance totale accordée à l'appelant immédiat. Ce membre ne peut pas être utilisé par du code d'un niveau de confiance partiel. Pour plus d'informations, consultez Utilisation de bibliothèques à partir de code d'un niveau de confiance partiel.