{"id":7575,"date":"2018-04-27T15:03:32","date_gmt":"2018-04-27T13:03:32","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=7575"},"modified":"2024-02-06T16:09:15","modified_gmt":"2024-02-06T15:09:15","slug":"import-data-xml-using-power-query-get-transform-2","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/import-data-xml-using-power-query-get-transform-2\/","title":{"rendered":"Import Data from XML Using Power Query or Get &#038; Transform"},"content":{"rendered":"<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/installing-power-query-excel-2010\/\" target=\"_blank\" rel=\"noopener noreferrer\">Power Query<\/a>\u00a0or Get &amp; Transform (In Excel 2016) lets you perform a series of steps to transform your Excel data.<\/p>\n<p>But what if your data source is not in your Excel <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/free-excel-templates-and-spreadsheets\/\" target=\"_blank\" rel=\"noopener\" title=\"spreadsheet\" data-wpil-keyword-link=\"linked\">spreadsheet<\/a>?<\/p>\n<p>It&#8217;s very common nowadays to get data imported from a company&#8217;s accounting or sales system in the XML format.\u00a0 If it&#8217;s inside a XML (extensible markup language) file, it&#8217;s very easy to <strong>import data from xml<\/strong> and right into\u00a0<strong><a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/50-things-you-can-do-with-excel-power-query\/\" target=\"_blank\" rel=\"noopener\" title=\"Power Query\" data-wpil-keyword-link=\"linked\">Power Query<\/a>!\u00a0\u00a0<\/strong><\/p>\n<p>Let&#8217;s suppose you have this set of data from the xml file:<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-01.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Import Data from XML Using Power Query or Get &amp; Transform\"  class=\"alignnone size-full wp-image-7577\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-01.png\" alt=\"Import Data from XML Using Power Query or Get &amp; Transform\" width=\"868\" height=\"543\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-01.png 868w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-01-300x188.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-01-768x480.png 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/a><\/p>\n<div class=\"after-post-box\">\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/yFKhRCWB2rg?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p class=\"line-two\"><a class=\"IRPP_minimalist icon-download button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML.zip\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML.zip\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook and source file<i class=\"fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">Get-Data-from-XML.zip<\/span><\/a><\/p>\n<p class=\"line-two\">\n<\/div>\n<p><span style=\"color: #ff0000;\"><strong>STEP 1<\/strong>:<\/span><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Using Excel 2016 (screenshot below)<\/strong><\/span><\/p>\n<p>Go to\u00a0<em><strong>Data &gt; New Query &gt; From File &gt; From XML<\/strong><\/em><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Using Excel 2013 or Excel 2010<\/strong><\/span><\/p>\n<p>Go to\u00a0<em><strong>Power Query &gt; From File &gt; From XML<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-02.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Import Data from XML Using Power Query or Get &amp; Transform\"  class=\"alignnone size-full wp-image-7578\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-02.png\" alt=\"Import Data from XML Using Power Query or Get &amp; Transform\" width=\"364\" height=\"336\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-02.png 364w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-02-300x277.png 300w\" sizes=\"(max-width: 364px) 100vw, 364px\" \/><\/a><\/p>\n<p>Select the\u00a0<strong>xml file\u00a0<\/strong>that contains the data.\u00a0 Click\u00a0<strong>Import.<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-03.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Import Data from XML Using Power Query or Get &amp; Transform\"  class=\"alignnone size-full wp-image-7579\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-03.png\" alt=\"Import Data from XML Using Power Query or Get &amp; Transform\" width=\"669\" height=\"473\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-03.png 669w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-03-300x212.png 300w\" sizes=\"(max-width: 669px) 100vw, 669px\" \/><\/a><\/p>\n<p>Select the <strong>XML Data Source.\u00a0\u00a0<\/strong>A\u00a0preview of the xml data will be shown.\u00a0 If it looks good, press\u00a0<strong>Edit.<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-04.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Import Data from XML Using Power Query or Get &amp; Transform\"  class=\"alignnone size-full wp-image-7580\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-04.png\" alt=\"Import Data from XML Using Power Query or Get &amp; Transform\" width=\"1041\" height=\"699\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-04.png 1041w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-04-300x201.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-04-1024x688.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-04-768x516.png 768w\" sizes=\"(max-width: 1041px) 100vw, 1041px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2<\/strong>:<\/span> This will open up the <strong>Power Query Editor<\/strong>.\u00a0 You can now perform your data manipulation here but we will keep the data as is.<\/p>\n<p>Click <strong>Close &amp; Load<\/strong> from the <strong>Home<\/strong> tab and this will <strong>open up a brand new worksheet<\/strong> in your Excel workbook with the imported table.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-05.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Import Data from XML Using Power Query or Get &amp; Transform\"  class=\"alignnone size-full wp-image-7581\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-05.png\" alt=\"Import Data from XML Using Power Query or Get &amp; Transform\" width=\"803\" height=\"322\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-05.png 803w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-05-300x120.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-05-768x308.png 768w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/a><\/p>\n<p>You now have your new table from the xml file!<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-06.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Import Data from XML Using Power Query or Get &amp; Transform\"  class=\"alignnone size-full wp-image-7583\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-06.png\" alt=\"Import Data from XML Using Power Query or Get &amp; Transform\" width=\"746\" height=\"130\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-06.png 746w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/Get-Data-from-XML-06-300x52.png 300w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\"><strong>Import Data from XML in Excel<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/100-21.html\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/09\/728x90.jpg\" alt=\"728x90\" width=\"728\" height=\"90\" title=\"\"><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Power Query\u00a0or Get &amp; Transform (In Excel 2016) lets you perform a series of steps to transform your Excel data. But what if your data source is not in your Excel spreadsheet? It&#8217;s very common nowadays to get data imported from a company&#8217;s accounting or sales system in the XML format.\u00a0 If it&#8217;s inside a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":17416,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[120,121],"tags":[154,117,323],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/7575"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=7575"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/7575\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17416"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=7575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=7575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=7575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}