For eg datatable as ColA,ColB,ColC it should create Colc again and rename it as “Proj” with same data
Input
Name
Value
Description
Aravind
Ram
Chennai
Sekar
Shan
Pondy
Output
Name
Value
Description
Proj
Aravind
Ram
Chennai
Chennai
Sekar
Shan
Pondy
Pondy
AshwinS2
(Ashwin S)
June 20, 2019, 9:17am
2
Hi @Aravinthan
Use invoke method and dt.columns and set ordinal as type in collection add the string var
Thanks
Ashwin.S
will you please the exact code syntax
amarasto
(Aman Rastogi)
June 20, 2019, 10:00am
4
Hey @Aravinthan ,
Iterate through the data table columns and replace the COLC.
Please have a look at the screenshot below:
AshwinS2
(Ashwin S)
June 20, 2019, 10:15am
5
Hi @Aravinthan
Use in datatable as row(“colC”).ToString.expression=“proj”
Then use write range
Thanks
Ashwin.S
how to get the same colc row values in proj column
amarasto
(Aman Rastogi)
June 20, 2019, 11:26am
7
Hey @Aravinthan ,
You are just changing the column name.Data is still at the same place.no need to write additional code.
Iam actually recreating ColC as project with same colC values
Input
Name
Value
Description
Aravind
Ram
Chennai
Sekar
Shan
Pondy
Output
Name
Value
Description
Proj
Aravind
Ram
Chennai
Chennai
Sekar
Shan
Pondy
Pondy
amarasto
(Aman Rastogi)
June 20, 2019, 11:38am
9
Hi @Aravinthan ,
Use Add Data Column Activity to add the Proj column and then iterate the datatatble using for eachrow and assign the values to new data column.please find the screenshot below for further reference:
getting below issue it is not copying description values and pasting in project column
Hi bro i have changed the linq query as below and it works thank you
(From x In dt2.AsEnumerable()
Select dt2.Clone.Rows.Add({x.Item(“Name”),x.Item(“value”),x.Item(“Description”),x.Item(“Description”)})).copytodatatable
@Aravinthan
Sorry i forgot to add string.join
(From x In dt2.AsEnumerable()
Select dt2.Clone.Rows.Add({String.Join(“,”,x.ItemArray),x(“Description”)})).copytodatatable
system
(system)
Closed
June 24, 2019, 10:12am
15
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.