Share via


Worksheet.XmlDataQuery(String, Object, Object) Method

Definition

Gets a Range object that represents the cells mapped to a particular XPath. Gets null if the specified XPath has not been mapped to the worksheet, or if the mapped range is empty.

public Microsoft.Office.Interop.Excel.Range XmlDataQuery (string XPath, object SelectionNamespaces, object Map);
abstract member XmlDataQuery : string * obj * obj -> Microsoft.Office.Interop.Excel.Range
Public Function XmlDataQuery (XPath As String, Optional SelectionNamespaces As Object, Optional Map As Object) As Range

Parameters

XPath
String

The XPath to query for.

SelectionNamespaces
Object

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

Map
Object

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

Returns

A Range object that represents the cells mapped to a particular XPath; null if the specified XPath has not been mapped to the worksheet, or if the mapped range is empty.

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.

If the XPath exists within a column in an XML list, the Range object returned does not include the header row or the Insert row.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to