
Our first transformation keeps only the files we wish to be combined (i.e., the CSV files for our current example). This is the same process used to list the files in a folder. Instead, Power Query shows data about the files. However, it does not show the data from the files as we might be used to seeing. My advice is always to click Transform Data to ensure the data is correct before pushing it into Excel.

xlsx files in the folder we can’t combine these easily. Instead, we click Transform Data and take a closer look at what’s happening here. If the files are uniform and no edits are required, we could click Combine (drop-down button) > Combine Close & Load. However, you’ll notice we have a mix of. Navigate to the folder containing the files to import, then click Open.Ī preview of the folder and file attributes is displayed.

In Excel, click Data > Get Data > From File > From Folder

We will add those files later as part of the example. In the example, I have used a folder called Import Folder.ĭo not include the March or April files in the folder at this stage. xlsx files). These are the files to import initially. To work along with the example in this post, start by moving the January and February files into a separate folder (both the. txt, XML or JSON, etc., you can still use the techniques in this post, but it will require some changes to the process.

So, these are the two file types covered in this post. The most common file types for Excel users are CSV and Excel workbooks. There are more advanced techniques we can use to combine files with different structures, but that is not for the faint-hearted and is outside the scope of this post. To add another file to the output table, we only have to save a copy of the file in the folder and click refresh the new file will be imported too. This can save us days of time over a month.īefore we get started on this technique, there is one point to make you aware of. The files to be imported must follow a similar structure and column pattern. Power Query is magic, but you’ve got to give it a reasonable chance. In this post, we use Power Query to import all the files in a folder. We give Power Query a folder path, click a few buttons, and it imports and combines all the files into a single table. It’s like magic!
