A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Show us your Mcode (Right-Click the query and copy, paste it here).
Andreas.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I created an Excel file that uses Power Query to generate a table. The table is created by extracting data from a folder where I deposit CSV files. It works fine when the CSV files added to the folder have the same column name, position or number. However, it's not viable if there's a new column added or if there are changes to the column position of newer CSV files. Currently, if newer files have new columns added, I will delete the newly added column in that file. Are there any better ways to do this on the Power Query Editor so that I do not need to keep modifying new files before depositing them into the folder?
For example:
Old File (used this first CSV file in the folder to generate the table)
Currently Newer csv files has one more column added (RFQ ID @ Column A)
Will appreciate the help. Thank you
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Show us your Mcode (Right-Click the query and copy, paste it here).
Andreas.
Hi,
I'm Ajibola, an Independent Consultant here and a Microsoft user like you. I don't work for Microsoft and cannot access any of your data on their system.
There is a way to handle varying column structures in Power Query without manually modifying the CSV files each time you add them to the folder. Power Query has a feature called "Combine Binaries" that can help you achieve this.
When you use "Combine Binaries" in Power Query, it will dynamically detect the columns from all the CSV files in the folder and merge them into a single table, even if the columns vary in number or position. Here's how you can do it:
By using "Combine Binaries," Power Query will automatically handle variations in column structures, making it easier for you to work with new files without manually modifying them beforehand.
Kind regards Ajibola