{"id":7945,"date":"2018-02-28T00:40:37","date_gmt":"2018-02-27T23:40:37","guid":{"rendered":"https:\/\/www.myexcelonline.com\/blog\/?p=7519"},"modified":"2024-02-06T16:09:10","modified_gmt":"2024-02-06T15:09:10","slug":"import-data-from-text-using-power-query-or-get-transform","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/import-data-from-text-using-power-query-or-get-transform\/","title":{"rendered":"Import Data from Text 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>If it&#8217;s inside a text file, it&#8217;s very easy to <strong>import data from text<\/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>!<\/strong><\/p>\n<p>Let&#8217;s suppose you have this set of data from a text file:<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-01.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7521\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-01.png\" alt=\"Import Data from Text Using Power Query or Get &amp; Transform\" width=\"258\" height=\"263\"><\/a><\/p>\n<div class=\"after-post-box\">\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/MDYIhrorCEs?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\/2017\/12\/Get-Data-from-Text.zip\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text.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-Text.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;\"><span style=\"color: #0000ff;\"><strong>Using Excel 2016 (screenshot below)<\/strong><\/span><\/span><\/p>\n<p>Go to\u00a0<em><strong>Data &gt; New Query &gt; From File &gt; From Text\u00a0<\/strong><\/em><\/p>\n<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #0000ff; text-decoration: underline;\">Using Excel 2013 or Excel 2010<\/span><\/strong><\/span><\/p>\n<p>Go to\u00a0<em><strong>Power Query &gt; From File &gt; From Text<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-02.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7522\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-02.png\" alt=\"Import Data from Text Using Power Query or Get &amp; Transform\" width=\"426\" height=\"347\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-02.png 426w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-02-300x244.png 300w\" sizes=\"(max-width: 426px) 100vw, 426px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Select the\u00a0<strong>text file (with extension <em>.txt<\/em>)\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\/2017\/12\/Get-Data-from-Text-03.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7523\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-03.png\" alt=\"Import Data from Text Using Power Query or Get &amp; Transform\" width=\"666\" height=\"466\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-03.png 666w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-03-300x210.png 300w\" sizes=\"(max-width: 666px) 100vw, 666px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>A\u00a0preview of the text 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\/2017\/12\/Get-Data-from-Text-04.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7524\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-04.png\" alt=\"Import Data from Text Using Power Query or Get &amp; Transform\" width=\"759\" height=\"378\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-04.png 759w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-04-300x149.png 300w\" sizes=\"(max-width: 759px) 100vw, 759px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2<\/strong>:<\/span> This will open up the Power Query Editor.<\/p>\n<p>Go to\u00a0<em><strong>Home &gt; Transform &gt; Use First Row As Headers<\/strong>.\u00a0<\/em><\/p>\n<p>This will give your table the correct Column Headers.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-05.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7525\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-05.png\" alt=\"Import Data from Text Using Power Query or Get &amp; Transform\" width=\"761\" height=\"457\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-05.png 761w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-05-300x180.png 300w\" sizes=\"(max-width: 761px) 100vw, 761px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #ff0000;\">STEP 3:<\/span> <\/strong>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\/2017\/12\/Get-Data-from-Text-06.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7526\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-06.png\" alt=\"Import Data from Text Using Power Query or Get &amp; Transform\" width=\"387\" height=\"405\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-06.png 387w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-06-287x300.png 287w\" sizes=\"(max-width: 387px) 100vw, 387px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You now have your new table from the text file!<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-07.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7527\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/12\/Get-Data-from-Text-07.png\" alt=\"Import Data from Text Using Power Query or Get &amp; Transform\" width=\"205\" height=\"248\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #0000ff;\"><strong>Import Data from Text Using Power Query or Get &amp; Transform<\/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? If it&#8217;s inside a text file, it&#8217;s very easy to import data from text and right into\u00a0Power Query! Let&#8217;s suppose you have this [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":17523,"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,70],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/7945"}],"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=7945"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/7945\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17523"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=7945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=7945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=7945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}