I have a column of names in (lastname, Firstname) format which is to be dumped into another excel sheet in the format of FirstnameLastname.
Buddy @learie
Kindly follow the below steps to get your issue resolved
- open excel application scope
- use read range to read the data in excel with output variable of type out_dt with add headers unchecked
- For each row loop with out_dt as input
- two assign activity with
column_1_value = row(0)
column_2_value = row(1)
5.use write cell activity with cell value as “A”+counter_1.Tostring
and another write cell activity with cell value as “B”+counter2.Tostring
increment this counter_1 and counter_2 from initial value 1 with
counter_1+1 and counter_2 + 1
Cheers
Thank you very much Sir…I will try this and get back to you
Actually the Full names right now exists as a single string in a single cell down a column
hii
@learie
Check this sample workflow and change things according your requirements.ChangeColumns.xaml (7.6 KB)
Regards,
Monika
read 1st and last name then use write activity and then 1st + 2nd name it should be working for you
Thank you for your reply. I actually wanted to interchange the position of name in the same column. Will you be able to help me with that
I’m sorry but i want to change the position of the full name from Lastname,Firstname to Firstname lastname
Buddy can you kindly come again with the requirments, may be i hope i didnt understand…don’t mistake,just to clarify
Cheers
Ok… I have a set of names in a column in an excel sheet in the format Lastname, Firstname.
Now, I want to copy these names to another sheet by changing the format to FirstnameLastname
So you want the order to be changed right…? like it was lastname, firstname
now you want to be in firstname, lastname
am i right buddy @learie
do it as 2nd + 1st name buddy
i will share a sample workflow wait
just for confirmation from excel you are reading 1st and 2nd name
now you want that to print on excel as 2nd and 1st name together i am correct ?
yes exactly…
Thank you very much… it is already existing together as a string…I just want to change the order of the name to FirstnameLastname
great here is your procedure buddy @learie
- open excel appication scope
- use read range activity with output out_dt
- use a build datatable with headers like FirstName and LastName both in string format and name the datatable as final_dt
- use a clear datatable activity and pass the input as final_dt
- use a for each row loop buddy with two assign activitties in it.
- pass out_dt as input to for each row loop buddy
- for first assign activity
final_dt.Rows(out_dt.Rows.Indexof(row))(1) = row(“LastName”).ToString
and second assign activity with
final_dt.Rows(out_dt.Rows.Indexof(row))(0) = row(“FirstName”).ToString - Then outside this for each row loop use a write range workbook activity and mention the path of the excel file you want to enter with this data and pass the datatable input as final_dt
9 Thats all buddy you are all done
Cheers
Thank you very much
Kindly let know whether this works buddy
Cheers
yes…i will get back to you once this is done. once again thank you
Hii… It is working .Thank you very much