Data segregation into Excel

Hi All,
I want to segregate the data of a particular column into multiple columns as attached .InputExcel.xlsx (8.2 KB) OutputExcel.xlsx (8.3 KB)

The segregated data should be like the OutputExcel file. Is there any specific activity for this?

@AditiGandhi

1, Drag and drop Build datatable activity and Create a Data Table as per the Column name of your output file and store this in DataTable Variable (DT1)

2, Drag and Drop Excel application Scope and choose the input file path

3, Drag and drop read cell activity and read the cell as a form of String (Str1).

4, Create a Array Variable (StrArray).

5, Pick assign activity StrArray = Str1.Split(Environment.NewLine.TocharArray)

6, Pick For each Activity and pass the StrArray and change the ITEM variable as String

7, Place the AddDataRow activity inside the for each and use this code in ArrayRow {item.trim.split(“ ”.ToCharArray.Trim)(0), item.trim.split(“ ”.ToCharArray.Trim)(1), item.trim.split(“ ”.ToCharArray.Trim)(2), item.trim.split(“ ”.ToCharArray.Trim)(3)}

Add Pass the DT1 DataTable variable in AddDataRow Activity.

8, Drag and drop WriteRange Activity and pass the DT1 DataTable variable. Choose the file path wherever you want.

Thanks… Happy learning.

Hey! it’s just a thought, apply it once, it might get to the solution. You could use split(variable.tostring,“delimiter”) in your case " " is your delimiter, thats what dividing your name, age and every thing and add them to a list. Then you can create a new datatable with that data.