Let’s say you have a team working on a project and each of them created a CSV file. You are left with a considerable number of CSV files that you have to analyze and collect data from. Obviously, opening each CSV file and copying all the data from them onto a new CSV is a tedious task. How about you get it done with a single command though?
In this article, we explain in the most simple steps on how you can easily merge multiple CSV files into a single excel workbook. Read on, to learn how!
Step 1: Copy all the CSV files that you want to merge onto a single folder.
In the example below, I need to merge cars.csv and products.csv. So they are copied onto a folder named Geek Page CSV Merge.
Step 2: Launch the Run window by pressing the keys Win + R together. Once it launches, type in cmd and hit Enter key.
Step 3: Once the Command Prompt launches, navigate to the folder where you have copied your CSV files at. You can use the CD command for changing the directory in Command Prompt.
Once you are at the desired folder, type in the following command and hit Enter key.
copy *.csv <name_of_your_merged_file.csv>
Please replace name_of_your_merged_file with a name of your choice. Remember to give the extension as CSV.
Step 4: Now if you look at your merging folder, you can see that a new CSV file is created, by merging the other CSV files present in the folder.
Double click on the new file to open it in excel.
Step 5: When the file opens in excel, click on the File tab at the top.
Step 6: As next, click on the Save As option from the left ribbon. Choose the location where you want to create your new workbook at. I have chosen the same merging folder for this step.
Note: You can use the Browse button and choose any location of your choice.
Step 7: In the File name field, give a name to your new workbook. Click on the drop-down menu associated with Save as type. Choose Excel Workbook from the list of options. Hit the Save button once you are done.
Step 8: That’s it. If you now look at the location that you chose to save your new workbook at, you can see that a new file has been created. This file is a Workbook file created by merging all your required CSV files. Enjoy!
Hope you found the article useful.