How to collate multiple CSV files in single CSV/xlsx


I’m trying to combine multiple CSV files in single CSV files or convert into single workbook (.xlsx) file.

I would like you to share me the best steps to do it.


Hi @sahusantosh, you might want to try mergedatatable activity.


Yes, i have more than 5 CSV which includes data and i want to copy all those data in one below others


  1. Use build datatable activity and create the columns as in ur excel and aasign output to datatable variable.
  2. Get the files in ur directory by using command like below and and assign it to string array variable.

array=Directory.GetFiles(“Ur directory path”)

  1. Use for loop to get the each everytime loop runs(use array variable here as input)
  2. use read csv file and assign output to new datatable variable
  3. Use merge datatable activity to merge dataTable(destination) obtained by read csv to dataTable(source) of build datatable activity.
  4. After for loop write the datatable of build datatable activity to excel or csv.

thanks bro

1 Like