Splitting the single column into two

Hi All,

I have nearly 35 rows and 5000+ columns where in that one of the row has information as in firstname,lastname email_id. Here i wanted this to be splitted into Firstname,Lastname in newly added column and email_id in another newly added column of the excel sheet.

Eg : Mudiar, Yashas yashas.mudiar@gmail.com

I want the result to be in 2 newly added columns like,
1st column : Mudiar, Yashas
2nd column : yashas.mudiar@gmail.com
One this is done, the newly added email id column has to be compared with another excel sheet for the emiail id.

Can anyone please help me here. It is really urgent I dont have any idea to implement this logic in UiPath.
Kindly help me asap.
Please respond back for any further clarifications.

Selvarani M

@selvarani1390 Split ur string wrt spaces concat 0th and 1sr element of array to get first and last name and 2nd element contains email id.

using assign statement u can do it.

Example: β€œName” and β€œEmail” are ur 2 new columns.

Inside for each data row split the value from respective row as i said above and using assign activity assign values to respective columns like below

 row("Name") = array(0)+" "+array(1)
 row("Email") = array(2)

Hi Find the attached Soloution.

Split Colums.zip (15.8 KB)


  1. Read the Data from from Excel.
  2. For each row get the value of the column which contains the required data.
  3. Split the obtained column on the basis of space.
  4. Look for part that contains β€œ@” , assign it to email filed.
  5. Now remove the obtained email filed from the column filed and split the remaining on the basis of β€œ,”
  6. Assign the obtained results in the first name and second name.
  7. Keep adding records in the final table which will contain the splited values.
  8. Write the final table in the input value.

Note : If you just want the name and email IDs then you can avoid the second split, and just replace the email ID and assign the values to required columns. The attached solution works for all types of name (where the second name part can have two or more spaces)

Hi RIshiVC1,

Thanks for your quick response. I implemented this and am getting the following error



error is in this assign part, image

Please help me to get rid ride of this.

And also i wanted to add these columns and also my old excel sheet in output..

Kindly add the logic for that as well which helps me lot.

Selvarani M

Can you share the excel or the perticular value for which you are getting the error ?

Hi Rishi,

Your help is highly appreciable. Thanks for that

I am attaching the sample input and output sheet for your perusal.

In the input sheet i have some rows and columns but i want only the submitted by column to be splitted into name and email id.

In the output sheet i have added new new columns for name and email id along with the input data. I have highlighted the news columns.

I want the files to be in this manner.

Kindly help.Sample input sheet.xlsx (9.2 KB)
Sample output sheet.xlsx (9.7 KB)

Selvarani M

Hi @RishiVC1 ,

can you please reply to this issue.

Kindly help me here. I am really new to UiPath and i couldnt get through the logics of array and data table.

Please help

Selvarani M

Hi please find the attached solution. For more details on how to use the split method follow this link : String.Split Method

Split Columns v2.zip (18.0 KB)

1 Like

Thanks for your help

Please mark the answer as solution and close the thread :slight_smile:

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