XmlMappedRange.ClearFormats 메서드
XmlMappedRange 컨트롤의 서식을 지웁니다.
네임스페이스: Microsoft.Office.Tools.Excel
어셈블리: Microsoft.Office.Tools.Excel(Microsoft.Office.Tools.Excel.dll)
구문
‘선언
Function ClearFormats As Object
Object ClearFormats()
반환 값
형식: System.Object
예제
다음 코드 예제에서는 BorderAround 메서드를 사용하여 XmlMappedRange 주위에 두꺼운 테두리를 적용합니다. 그런 다음 ClearFormats 메서드를 사용하여 사용자에게 테두리를 지우도록 요청하는 프롬프트를 표시합니다. 이 코드 예제에서는 현재 워크시트에 CustomerLastNameCell이라는 XmlMappedRange가 포함되어 있다고 가정합니다.
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 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.