Aracılığıyla paylaş


XmlMappedRange.XPath Özellik

Alır bir Microsoft.Office.Interop.Excel.XPath eşlenmiş öğenin XPath temsil eden XmlMappedRange Denetim.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property XPath As XPath
    Get
XPath XPath { get; }

Özellik Değeri

Tür: Microsoft.Office.Interop.Excel.XPath
Bir Microsoft.Office.Interop.Excel.XPath eşlenmiş öğenin XPath temsil eden XmlMappedRange Denetim.

Örnekler

Aşağıdaki kod örneği XPath özelliği XPath kaldırmak için bir XmlMappedRange XPath ise "/ ns1:Customer / ns1:LastName". Örnek sonra geçerli XPath görüntüler XmlMappedRange. Bu kod örneği, geçerli çalışma sayfasının içerdiğini varsayar bir XmlMappedRange adlı CustomerLastNameCell.

Private Sub RemoveXPath()
    If Me.CustomerLastNameCell.XPath.Value = _
        "/ns1:Customer/ns1:LastName" Then
        Me.CustomerLastNameCell.XPath.Clear()
        MsgBox("Removed matching XPath.")
    End If

    If Me.CustomerLastNameCell.XPath.Value = Nothing Then
        MsgBox("The XmlMappedRange has no XPath.")
    Else
        MsgBox("The XPath of the XmlMappedRange is " & _
            Me.CustomerLastNameCell.XPath.Value)
    End If
End Sub
private void DisplayXPath()
{
    if (this.CustomerLastNameCell.XPath.Value ==
        "/ns1:Customer/ns1:LastName")
    {
        this.CustomerLastNameCell.XPath.Clear();
        MessageBox.Show("Removed mathing XPath.");
    }

    if (this.CustomerLastNameCell.XPath.Value == null)
    {
        MessageBox.Show("The XmlMappedRange has no XPath.");
    }
    else
    {
        MessageBox.Show("The XPath of the XmlMappedRange is " +
            this.CustomerLastNameCell.XPath.Value);
    }
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

XmlMappedRange Arabirim

Microsoft.Office.Tools.Excel Ad Alanı