Forum Discussion
Combining different Excel workbooks into one consolidated view
Hi.
I have a folder that contains different workbooks with 2 sheets: a main one that follows a certain template (see below) and a data validation sheet that's hidden. The sheet names are different for each workbook. I want to combine all Excel workbooks into one consolidated view and add a column, called code, that takes whatever code is on cell C19 and replicates it from the respective data.
The template looks like this roughly. All files follow the same structure. I want to return all the columns highlighed in yellow, and all files have the same header names.
The output table would be these columns plus an extra column which is the code.
| Code | All yellow columns |
| 549 | .. |
How can that be done? I am still new to Power Query queries. I can load in and loop over the files but I am not sure how to only get a single header from the first file or how to combine all without overwriting. Also, the data above the headers are being loaded weirdly. And two columns are data validation: will they be retained when we combine the Excel files? If not, it's okay if it's just the values without the data valition.
Any help on this would be appreaciated.
1 Reply
- AnonymousNot applicable
Hi ZJJK
If the column name in the same in these tables, you can use combine excel files in folder, you can refer to the following link.
Combine Excel Files with Power BI / Power Query — The Power User
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.