Import of XML files

Excel has previously offered possibility to import XML files, but it was a rather tedious process because it was necessary to join the corresponding XML schema with the file. Although by definition it is simple, it often happened that my success, and others’ failure, could only be explained by the words: “Excel loves me and does not love you”. You will admit, this is not a fair explanation. Power Query maximally simplified this operation!

To begin with, you need one simple XML file, recorded on disk:

<?xml version=”1.0″ encoding=”UTF-8″?>

The import process is very simple, on the Data ribbon choose New Query / From File / From XML.

Then select the desired XML file. An import window will open where you should to select the entity on the basis of which the data is being grouped. In our case, it is a “person”. Power Query will automatically generate a preview on the right side of the window. By clicking on Load, data is imported into a structured table.