How to Import Each File Details from a Folder into Cells in Excel

In this Intermediate excel tutorial you'll learn to import important file details using Power query. This will be a dynamic Data table and you don't need any VBA to do this.

You don’t have to type or use VBA to import file details from folder to excel workbook. Most people still struggle while importing file details into cells in excel. Let us emphasize a scenario. You have hundreds of files in a Folder, and you need some info regarding the files such as Filename, File Extension, File Path, Date Created, Date Modified, and Date accessed. Now list all of them in your excel workbook.

It’s an intermediate excel tutorial, and I’ll use Excel’s built-in feature, Get & Transform AKA Power query, to solve this. If you are using Excel Version below 2016, you need to download the Power Query add-in from Microsoft. Remember, Microsoft doesn’t update the Power Query add-in for Excel 2010/2013 anymore. But you free to download and use it.

If you are using older versions and don’t want to download the power query, please check How to import multiple file names, paths, and extensions into cells in excel. I’ve used VBA to do the same thing. So, you don’t need to download the power query add-in anymore.  

Now, if you are using versions above excel 2016, then you are good to go. Now let’s follow some effortless instructions and extract those crucial file details.

1. Click on the “Data” tab and find “New Query” or “Get Data” based on the version you are using.

2. Click on “From File” and then “From Folder.”

3. Write the file path or browse the folder directly.

4. Now select the folder and Click OK, Twice.

5. If you want to import all the file details, File Content, File Attribute, Filename, File Extension, File Path, Date Created, Date Modified, and Date accessed, you can select Load.

6. If you need to load specific details, then click on Edit.

7. Remove the columns of your choice by right click and delete.

8. Now click save and load.

Now excel will create a table for you and display your selected file details. That is not just a table. That is a dynamic data table. Now go back to the folder from where you import all the file details and delete a file. Now come back to the workbook and click on refresh under the data tab. Check in the table that file details are gone. Now add a file to the source folder, and from the workbook, click refresh. You’ll see the file details inside your table. Power query creates a connection to the workbook and the folder, and whenever a value changes, power query can easily anticipate that and change the table accordingly. There are tons of functionalities in the power query or Get & Transform feature. This is just a start.

 

follow the MS Excel tutorial


You may also like:

How to Rename Multiple Files at Once

In this advanced excel tutorial, you'll learn to rename multiple files at once from a folder. You'll be able to change names with any file type like PDF, JPEG, Xlsx, etc.......

How to import multiple filenames, paths, and extensions into cells in excel

In this advanced excel tutorial, you’ll learn to extract multiple filenames from a folder to an excel worksheet. You’ll be able to extract filenames, file paths, and file extensions.......