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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.