Friday, December 11, 2015

How to merge multiple csv files into one csv file?

  •  Move all of the CSV files into one folder and there is no other unnecessary csv files
  • Open the cmd window and using cd to get to the folders with all the csv files that you want to be merged.
  • Writing command like this : 
            copy *.csv baseline_20151211.cvs


  • The new csv file is generated.

d




  • Note:  if every csv file has headers, all of the headers will be copied into the new files, so avoid this, before you do the merge job, please remove the headers from the csv file and only leave the headers in the first csv file. 
  • NOTE: for the merged file, sometimes can’t be open correctly by the Excel. So we need to do another thing before merge. Open one of the csv file in notepad or other file editor, added one line like this:                                      Sep=,


After doing this, the new merged csv file will open in the Excel file correctly.

No comments:

Post a Comment