FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

The following article introduces you to the FILTERXML function - one of the functions in the Web function group is very popular in Excel.

FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel Picture 1

Description: The function returns specified data from XML content using the specified XPath. Support functions from Excel 2013 onwards.

Syntax: FILTERXML (xml, xpath)

Inside:

- xml: A string in valid XML, is a required parameter.

- xpath: A string in standard XPath form, is a required parameter.

Attention:

- If xml is invalid -> the function returns the #VALUE! Error value

- If the xml contains a namespace with an invalid prefix -> the function returns the #VALUE! Error value

For example:

Determining the return value from the XML content returned in the URL string is described in the table below:

FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel Picture 2

- Find the WEBSERVICE value from the above URL string. Enter the formula: = WEBSERVICE (D6)

FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel Picture 3

- Press Enter -> return value is:

FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel Picture 4

- The value returned from the XML content returned in the URL string. Enter the formula: = FILTERXML (D7, "// food / name")

FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel Picture 5

- Press Enter -> the value returned from the XML content in the above URL string is:

FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel Picture 6

Above are instructions and some specific examples when using the FILTERXML function in Excel.

Good luck!

4.5 ★ | 2 Vote

May be interested

  • WEBSERVICE function - The function returns data from a web service on the Internet or Intranet in ExcelPhoto of WEBSERVICE function - The function returns data from a web service on the Internet or Intranet in Excel
    webservice function: the function returns data from a web service on the internet or intranet. support functions from excel 2013 onwards. syntax: webservice (url)
  • How to create notes for documents in ExcelPhoto of How to create notes for documents in Excel
    instructions on how to create notes for documents in excel. you can customize the comment to a formula or to a data cell in a spreadsheet by doing the following steps: step 1: select the cell to insert a comment - go to review - new comment tab.
  • Use the search and replace function in ExcelPhoto of Use the search and replace function in Excel
    instructions on how to use the search and replace function in excel. you can customize the addition of a comment to a formula or to a data cell in a worksheet by performing the following steps: 1. find data search feature. step 1: open the find and rep dialog box
  • Set the AutoCorrect function in ExcelPhoto of Set the AutoCorrect function in Excel
    instructions on how to set up the autocorrect function in excel. to set up the autocorrect function in excel, do the following: step 1: go to the file - option tab: step 2: the excel option dialog box appears - choose proofing - autocorrrect options
  • How to protect spreadsheets in ExcelPhoto of How to protect spreadsheets in Excel
    instructions on how to protect spreadsheets in excel. protecting spreadsheets is an essential need of many users, thanks to this feature who makes spreadsheets can secure their data. to protect a spreadsheet, follow these steps: step 1: right-click v
  • How to insert and delete worksheets in ExcelPhoto of How to insert and delete worksheets in Excel
    instructions on how to insert and delete worksheets in excel. 1. insert a sheet (sheet) in excel. step 1: right-click on any sheet (or you can choose a new sheet location) - insert: step 2: the insert dialog box appears - click worksh