Partager via


_Worksheet.XmlMapQuery Method

Returns a Range object that represents the cells mapped to a particular XPath. Returns Nothing if the specified XPath has not been mapped to the worksheet.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function XmlMapQuery ( _
    XPath As String, _
    SelectionNamespaces As Object, _
    Map As Object _
) As Range
'Usage
Dim instance As _Worksheet
Dim XPath As String
Dim SelectionNamespaces As Object
Dim Map As Object
Dim returnValue As Range

returnValue = instance.XmlMapQuery(XPath, _
    SelectionNamespaces, Map)
Range XmlMapQuery(
    string XPath,
    Object SelectionNamespaces,
    Object Map
)

Parameters

  • XPath
    Type: System.String

    Required Object. The XPath to query for.

  • SelectionNamespaces
    Type: System.Object

    Optional Object. A space-delimited String that contains the namespaces referenced in the XPath parameter. A run-time error will be generated if one of the specified namespaces cannot be resolved.

  • Map
    Type: System.Object

    Optional XmlMap. Specify an XML map if you want to query for the XPath within a specific map.

Return Value

Type: Microsoft.Office.Interop.Excel.Range

Remarks

XML features, except for saving files in the XML Spreadsheet format, are available only in Microsoft Office Professional Edition 2003 and Microsoft Office Excel 2003.

Unlike the XmlDataQuery method, the XmlMapQuery method returns the entire column of an XML list, including the header row and the Insert row.

See Also

Reference

_Worksheet Interface

_Worksheet Members

Microsoft.Office.Interop.Excel Namespace