Skip to main content
← All functions

FILTERXML function

The FILTERXML function returns specific data from XML content by using the specified xpath.

Extract matching elements or attributes from XML using an XPath selector. Browser practice runs locally and returns multiple matches as a vertical spill. Native FILTERXML is available in Windows Excel, not Excel for Mac or Excel for the web. Local practice accepts one XML string and one node-set selector (up to 1,024 characters); DTDs, scalar XPath results and range broadcasting are outside its contract. English decimal/scientific text becomes a number; other text stays text. Windows locale-specific date/currency conversion and native workbook recalculation remain unverified.

Syntax

FILTERXML(xml, xpath)

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
xmlYesA string in valid XML format."<root><item>value</item></root>"
xpathYesA string in standard XPath format."//item"

Try FILTERXML

Diagnose a selector with no matching orders

=FILTERXML(A2,B2)

There is no South-region order in this source. This practice returns #VALUE! for an empty selection. Change South to East in B2 to retrieve the two East-region names.

Inspect the current formula

Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.

Read the formula, one argument at a time

Explore the written function calls and their inputs. The calculation result belongs to the complete formula.

FILTERXML · top-level call

=FILTERXML(A2,B2)

1 / 2 · xml

A string in valid XML format.

FILTERXML reference ↗

Follow the cells behind a result

Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.

The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.

Reference and compatibility

Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.