Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Chema_Ortega
Helper III
Helper III

Combining Excel files from a folder

Hello everybody,

 

I hope you are well!!

 

I am trying to combine some Excel files from a folder. Each Excel file has an indetermined number of Excel sheet tabs. Each Excel is a Project, and in the sheet Tabs we find the Subprojects... Is there anyway to combine these files with Projects and Sub-projects in Power BI?

 

Should I better convert each tab of each excel file in another excel file? Would that be a wiser solution?

 

Thanks a lot! Best regards,

 

Chema Ortega

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Chema_Ortega ,

 

Suppose you have a table containing projects and subprojects information, where the project names are the same as the excel file names\workbook names, like this. 

 

vkkfmsft_1-1646816662255.png

 

Then you can try to create a custom column and import the corresponding table.

 

Custom = let
    Source = Excel.Workbook(File.Contents("C:\Users\Administrator\Desktop\Project Files\" &[Projects] & ".xlsx"), null, true),
    #"Subproject A1_Sheet" = Source{[Item=[Subprojects],Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(#"Subproject A1_Sheet", [PromoteAllScalars=true])
in
    #"Promoted Headers"

vkkfmsft_0-1646816608767.png

 

Then you can extend the column.

 

vkkfmsft_2-1646816698205.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

7 REPLIES 7
v-kkf-msft
Community Support
Community Support

Hi @Chema_Ortega ,

 

Has your problem been solved? If it is solved, please mark a reply which is helpful to you.

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.


Best Regards,
Winniz

v-kkf-msft
Community Support
Community Support

Hi @Chema_Ortega ,

 

Suppose you have a table containing projects and subprojects information, where the project names are the same as the excel file names\workbook names, like this. 

 

vkkfmsft_1-1646816662255.png

 

Then you can try to create a custom column and import the corresponding table.

 

Custom = let
    Source = Excel.Workbook(File.Contents("C:\Users\Administrator\Desktop\Project Files\" &[Projects] & ".xlsx"), null, true),
    #"Subproject A1_Sheet" = Source{[Item=[Subprojects],Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(#"Subproject A1_Sheet", [PromoteAllScalars=true])
in
    #"Promoted Headers"

vkkfmsft_0-1646816608767.png

 

Then you can extend the column.

 

vkkfmsft_2-1646816698205.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks soooo much!!!!!!! Great helpppp!!!

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @Chema_Ortega  - please watch the following video help you consider your options:

 

Importing Multiple Excel - Part 1 

Importing Multiple Excel - Part 2 

 

The trick is to filter to the Tables or Sheets that need to be imported.

 

Another consideration is to use an Custom Function to import each file.

Hi Daryl... But what I am trying to do is much more complex that what Ruth explains... I want to combine some Excel files that each one has some tabs with information. Anyway, thanks a lot!

I've literally just watched this which might help. https://lnkd.in/gi4CVABu

You'd have to combine it with the from folder function power query builds for you.

 

If you have some demo files I'd give it a go!

 

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Thanks a lot, Ben. I saw the video, but it does not helps to fnd the solution. Thanks a lot anyway. 

 

How can I send the files?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors