다음을 통해 공유


XmlMappedRange.Errors 속성

XmlMappedRange 컨트롤의 오류 검사 옵션에 액세스할 수 있도록 하는 Errors 개체를 가져옵니다.

네임스페이스:  Microsoft.Office.Tools.Excel
어셈블리:  Microsoft.Office.Tools.Excel(Microsoft.Office.Tools.Excel.dll)

구문

‘선언
ReadOnly Property Errors As Errors
Errors Errors { get; }

속성 값

형식: Microsoft.Office.Interop.Excel.Errors
XmlMappedRange 컨트롤의 오류 검사 옵션에 액세스할 수 있도록 하는 Errors 개체입니다.

설명

Errors 개체를 참조하여 오류 검사 옵션과 관련된 인덱스 값 목록을 봅니다.

예제

다음 코드 예제에서는 텍스트로 작성된 숫자를 XmlMappedRange에 삽입한 다음 Errors 속성을 사용하여 해당 숫자가 텍스트로 작성되었는지 확인합니다. 이 코드 예제에서는 현재 워크시트에 CustomerLastNameCell이라는 XmlMappedRange가 포함되어 있다고 가정합니다.

Private Sub CheckForErrors()
    Me.CustomerLastNameCell.Formula = "'12"

    If Me.CustomerLastNameCell.Errors( _
        Excel.XlErrorChecks.xlNumberAsText).Value Then
        MsgBox("The number is written as text.")
    Else
        MsgBox("The number is not written as text.")
    End If
End Sub
private void CheckForErrors()
{
    this.CustomerLastNameCell.Formula = "'12";

    if (this.CustomerLastNameCell.Errors[
        Excel.XlErrorChecks.xlNumberAsText].Value)
    {
         MessageBox.Show("The number is written as text.");
    }
    else
    {
        MessageBox.Show("The number is not written as text.");
    }
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

XmlMappedRange 인터페이스

Microsoft.Office.Tools.Excel 네임스페이스