Forum Discussion

daniel1409's avatar
daniel1409
Copper Contributor
Jun 06, 2023

Import data from folder

Hi everyone,

 

I'm trying to import multiple excel files from a folder to create a database. All the files have the exact same size, number of lines and format.

What I want is to all the steps in Power Query to apply individually in each file and after that, compile everything in the database. So far I was not able to do it.

 

Is it possible to do that in some way?

 

Thanks

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi daniel1409 

     

    What I want is to all the steps in Power Query to apply individually in each file

    Does this mean that you applied some "specific" transformations to one of your files and now want these transformations to apply to all the other files?

     

    If so you should turn your query as a function and invoke that function for each file in the folder before combining all the transformed file

     

    Any issue with this please upload & share (i.e. with OneDrive, Google Drive or any other file sharing service) a couple of representative workbooks + your current query

     

    Now, if you don't do any specific transformation the built-in Data > Get Data > From File > From Folder should do it

Resources