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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply

Combining Data From Multiple Worksheets Into one table

Hello,

 

How can i combine data from multiple worksheets of excel file into one table in PowerBi?

 

Sample file is attached - Click Here

 

Thanks

Gaurav

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@gaurav-narchal,

 

1. After connecting to the spreadsheet, right-click the file name and select Transform Data (don't select each individual sheet):

 

DataInsights_0-1622238012688.png

2. Modify the M code by changing the second argument to "true" (prevents repetition of column headers):

 

Excel.Workbook(File.Contents("C:\Users\MultiSheetImport.xlsx"), true, true)

 

3. In the Data column, click the Expand icon (double arrow):

 

DataInsights_1-1622238227728.png

 

4. Uncheck "Use original column name as prefix":

 

DataInsights_2-1622238333759.png

 

Result:

 

DataInsights_3-1622238472529.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
merryone
Regular Visitor

Thank you for this! This solution has really made a difference automating a feed into PBI where the source excel file have identical sheets added.

Ashish_Mathur
Super User
Super User

Hi,

See this video link  -Power Query #08: Import Multiple Excel Sheets From Multiple Excel Workbooks.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
DataInsights
Super User
Super User

@gaurav-narchal,

 

1. After connecting to the spreadsheet, right-click the file name and select Transform Data (don't select each individual sheet):

 

DataInsights_0-1622238012688.png

2. Modify the M code by changing the second argument to "true" (prevents repetition of column headers):

 

Excel.Workbook(File.Contents("C:\Users\MultiSheetImport.xlsx"), true, true)

 

3. In the Data column, click the Expand icon (double arrow):

 

DataInsights_1-1622238227728.png

 

4. Uncheck "Use original column name as prefix":

 

DataInsights_2-1622238333759.png

 

Result:

 

DataInsights_3-1622238472529.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.