Create separate CSV file for the data in each row of the Excel File


I want to create separate CSV file for each of the names you see in the below excel file.

every row hast to haveseparate csv file.

But the template of the CSV file is as follows
Data for the yellow shaded part would come from the above excel file
and the remaining fields are hard coded
Please advise. Thanks

please try these steps -

  1. Read your excel data and store it in a dt var, let say DT_Excel. (Using Read Range)
    2.Create a dat var “DT_Csv” using Build Data Table and mention all those column names that are present in your final Template.
  2. Take a "For Each " for DT_Excel and store your required variables in Variables, like
    VAR1 = DT_Excel.Row(index)(0).tostring
    VAR2 = DT_Excel.Row(index)(1).tostring
    VAR3 = DT_Excel.Row(index)(2).tostring
    VAR4 = DT_Excel.Row(index)(3).tostring and so on…
  3. then use a Add data row Activity inside it.
  4. in Properties of “Add Data Row”, your input Data Table will be DT_Csv and in arrayrow, insert your values as follows: {Nothing,Nothing,VAR1,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,VAR2,VAR3,VAR4…}
  5. Inside the loop take write CSV Activity and provide your Data Table - DT_Csv and it will create different files for different rows

Hope this might help you

@Sivasees_Rajguru thank you

I have a follow up question
is the foreach row of excel or for each row data table. A little bit confused!!


Can you try the following sample? (17.4 KB)


1 Like

Hi, its for each row of Data Table.

@Yoichi thank you. That was insightful.
I tried to run and I do not see it generating separate csv files per each of list.
I customized the process you attached, and I received this error


  1. Run your process without change, no error was thrown except I do not see CSV files generated
  2. Customized into my process threw the error I attached

@Yoichi I found where the issue was my process works fine. That was a great help. Thanks a lot.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.