cancel
Showing results for 
Search instead for 
Did you mean: 

Split the text in multiple rows

AsitabhaDeb
Level 6
Hi All,

I would like to split the data from multiple cell at a time. will it be possible .
First 5 alphabet from the text and paste in different column. 
From cell# F2 to F100 first 5 alphabet need to split and paste in column G.
Please help ASAP.

BR/Asitabha

------------------------------
Asitabha Deb
------------------------------
12 REPLIES 12

Hi,

Yes you can achieve this using below steps.
  1. Create Instance
  2. Open Workbook
  3. Get excel data as collection ( Use collection as its little bit faster compare to excel get value and set value)
  4. Create new column in collection to set value - if column is not there in excel
  5. now you have to use loop to access the collection data.
  6. Inside data you have to use left function to get 5 alphabets and store in collection new column
  7. write collection in excel.

I hope it will solve your issue.

Thanks
Nilesh

------------------------------
Nilesh Jadhav
Senior RPA Specialist
------------------------------
Nilesh Jadhav.
Consultant
ADP,India

Ok Nilesh. I will try and reply to you.

Thanks
Asitabha


Hi Nilesh,

Can you please explain point no. 6. It will be very helpfull. 

BR/DEB


Hi,

Consider your collection name is "Data" and there are 4 column inside your excel file which header is
1st Col = "FName" , 2nd Col = "MName" , 3rd col = "Lname" , 4th Col = "Alphabate"

Now follow below steps
  1. drag and drop one calculation stage and inside write expression Trim(Left([Data.Fname],5))
  2. In store result write [Data.Alphabate]

1st step will extract your first 5 character excluding space and 2nd will store extracted value in 4th Column.
Use write collection in excel action after end your loop.

I hope your issue will resolve 🙂

Do let me know if any issue.

Thanks
Nilesh

------------------------------
Nilesh Jadhav
Senior RPA Specialist
------------------------------
Nilesh Jadhav.
Consultant
ADP,India

Hi Nilesh,

The above Trim expression not working. Its giving me the error message.


I think the trim and Left should be reversed.. so first trim any empty spaces and then use left.. no?
Left(Trim([Data.Fname]),5)

------------------------------
Hetal Rathore
------------------------------
Rup Joshi

HI,

Unable to solve the issue. 
I have  data in the collection filed (Result Desc.)
Data = BD58DG896FG

I want the first 5 data i.e BD58D and from cell# F2 to F100. Same type of data

--
Thanks & Regard,

Asitabha Deb



Hi Asitabha,

What error you are getting?

try to use Left([Data.Fname],5) ( remove trim for time being)

Thanks
Nilesh


------------------------------
Nilesh Jadhav
Senior RPA Specialist
------------------------------
Nilesh Jadhav.
Consultant
ADP,India

I have text file with 200 data .such as name, policy number, account number and etc etc. How I could split it according to the column in my development ?



------------------------------
Shree Abhi
------------------------------