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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
chinaik123
Helper II
Helper II

Getting Data from SharePoint folder and combining multiple sheets in excel

Hi,

 

I need help to combine multiple sheets in multiple excel in a SharePoint folder.
I tried to do so but i can only use the first sheet as Example.

 

Thanks in advance!

1 ACCEPTED SOLUTION
shafiz_p
Super User
Super User

Hi @chinaik123  To combine multiple sheets of multiple excel of a folder from sharepoint, follow the steps mentioned below:

Consider each sheets of each excel file have same number of column and same header.

Let's see my demo excel sheets and files. 

shafiz_p_0-1728897085234.png

Folder name "Test" and multiple type of files. Let's check data and table in each sheet. 

shafiz_p_1-1728897206520.png

For demo, I have use same table meaning format same in each sheets of all 3 files but have different data. 

Go to Power BI > Get Data > Sharepoint Folder connector. Put the site URL in the box and authenticate. See image:

shafiz_p_2-1728897511312.png

 

You will get below window and hit Transform button. See image below:

shafiz_p_3-1728897601037.png

 

Power query will open and you will get all the files and folder of you sharepoint site. Go column named "Folder Path" and filter you desired folder only. See image below:

shafiz_p_4-1728897741341.png

After that you will get your desired files of the selected forlder. Go to extension column and filter only extension .xlsx and then click on double arrow head binary column. See image below:

shafiz_p_5-1728897835501.png

After clicking double arrow, you will get below screen. Click on folder icon and then ok. See image:

shafiz_p_6-1728898003606.png

See, all my files and tables are listed. Now i am interested only on tables from all sheet of all excel file. You could choose sheets also. Both are same. See image:

shafiz_p_7-1728898132171.png

Use dynamic filter to filter name. Because hardcoded will not work if in future you added more sheets and more table. See image below:
 

shafiz_p_8-1728898266542.png

 

Since my all table names starts with Tab, I will use that. See image below:

shafiz_p_9-1728898330301.png

 

See all the files and desired all tables are in line now. Remove all columns except data. Click and expand data tables and you get all the sheets from all files combined. See images below:

shafiz_p_10-1728898440216.pngshafiz_p_11-1728898469956.png

 

 

Here is the desired output:

shafiz_p_12-1728898513251.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

View solution in original post

5 REPLIES 5
Omid_Motamedise
Super User
Super User

Use Excel.Workbook function to extract data from all the sheets

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
shafiz_p
Super User
Super User

Hi @chinaik123  To combine multiple sheets of multiple excel of a folder from sharepoint, follow the steps mentioned below:

Consider each sheets of each excel file have same number of column and same header.

Let's see my demo excel sheets and files. 

shafiz_p_0-1728897085234.png

Folder name "Test" and multiple type of files. Let's check data and table in each sheet. 

shafiz_p_1-1728897206520.png

For demo, I have use same table meaning format same in each sheets of all 3 files but have different data. 

Go to Power BI > Get Data > Sharepoint Folder connector. Put the site URL in the box and authenticate. See image:

shafiz_p_2-1728897511312.png

 

You will get below window and hit Transform button. See image below:

shafiz_p_3-1728897601037.png

 

Power query will open and you will get all the files and folder of you sharepoint site. Go column named "Folder Path" and filter you desired folder only. See image below:

shafiz_p_4-1728897741341.png

After that you will get your desired files of the selected forlder. Go to extension column and filter only extension .xlsx and then click on double arrow head binary column. See image below:

shafiz_p_5-1728897835501.png

After clicking double arrow, you will get below screen. Click on folder icon and then ok. See image:

shafiz_p_6-1728898003606.png

See, all my files and tables are listed. Now i am interested only on tables from all sheet of all excel file. You could choose sheets also. Both are same. See image:

shafiz_p_7-1728898132171.png

Use dynamic filter to filter name. Because hardcoded will not work if in future you added more sheets and more table. See image below:
 

shafiz_p_8-1728898266542.png

 

Since my all table names starts with Tab, I will use that. See image below:

shafiz_p_9-1728898330301.png

 

See all the files and desired all tables are in line now. Remove all columns except data. Click and expand data tables and you get all the sheets from all files combined. See images below:

shafiz_p_10-1728898440216.pngshafiz_p_11-1728898469956.png

 

 

Here is the desired output:

shafiz_p_12-1728898513251.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

Hi @shafiz_p ,

Thank you so much, this works like wonders. Have been scratching my head for days over this

Great solution!


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

SamWiseOwl
Super User
Super User

Hi @chinaik123 

 

You can create a function that loops over all the sheets.

This is a video on creating a function to loop over web pages but the principal is the same:
https://www.youtube.com/watch?v=-jc68Mn_k2w

 

When you connect to the Excel sheet delete all the steps but source

SamWiseOwl_0-1728898394490.png

You can then use this list as the items to loop over.

On the navigation step you change the name of the sheet to the parameter you create as mentioned in the video.

SamWiseOwl_1-1728898493059.png

Have a go and let me know how you get on!


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.