FILTERXML function. Get data by specifying XPath in XML.(Microsoft Excel)

03/26/2024

Japanese version.

This function is to get data for a string in XML format by specifying XPath.

It can also be used for HTML.

Often used in conjunction with the WEBSERVICE function to access WebAPI from Excel.

How it works

=FILTERXML(XML,XPath)
ArgumentOmissionExplanation
XMLRequired argument.XML string from which to extract.
XPathRequired argument.Xpath indicating the target data.

Demonstrate

Sample XML and XPath and FILTERXML function results.

If XML or XPath is not parsable, a #VALUE! error will result.

Xpath rules vary widely, but at a minimum, the following rules should be used.

Specify the hierarchy of tags by starting with // and separating with /.

Use @ to specify tag attributes.

Spill

If you specify the argument "XPath" the cell range, it will be Spil.

---

Links

Microsoft Excel Functions Web