Hi,
Yes, You can use Power Query to remove duplicates from the combined data before saving it as a text file.
You can remove duplicates by choosing the column(s) you want to remove them from, going to the "Home" tab, and selecting the "Remove Rows" option. You can then select "Remove Duplicates" to get rid of any duplicate rows according to the selected column(s).
Also, you can use Power Query in Excel to combine all sheets from multiple Excel files into a single text file. Here's how you can do it:
- Open a new Excel workbook where you want to create the combined text file.
- Click "Get Data" in the "Get & Transform Data" section of the "Data" tab.
- Select "From File" and "From Folder" in the drop-down menu.
- Locate the folder containing your Excel files and choose it. Make sure "Combine & Transform Data" is selected, then click "OK".
- You can see a preview of each file in the folder in the Power Query Editor. To combine all the files, click the "Combine" button.
- Select the desired Combine operation (such as Combine & Load, Combine & Transform, etc.) in the "Combine Files" dialogue and click "OK".
- The selected Excel files' sheets will now be loaded by Power Query and combined into a single table.
- To load the combined data into a new worksheet in Excel, click the "Close & Load" button.
- When the data is loaded, you can select "Save As" and the text file format (.txt) in the new worksheet to save the data as a text file.
Let me know if you have any doubts.
Best Regards.