i have an excel, For e.,g
Column1,Column2
ABC,23
CBD,45
HDR,78
I need to insert a column in the above dt and the coulmn shold have value as “Yes”.
I need to achieve this without using for each as for-each loop takes more time.
The result should be like this.
Column1,Column2,Column3
ABC,23,Yes
CBD,45,Yes
HDR,78,Yes
Hi @Manikandasamy ,
Have you tried the Activity Add Data Column
? It has a property called Default Value
which you could use it to update all values of that column to the specified value.
Hi @Manikandasamy
To add a new column in an Excel file using UiPath, you can use the Add Data Column
activity. Here’s an example of how to use this activity:
First, drag and drop the Add Data Column
activity from the Activities panel onto the Designer panel.
Next, specify the input for the activity by setting the properties in the Properties panel.
In the DataTable
property, specify the data table that you want to add the new column to.
In the ColumnName
property, specify the name of the new column.
In the ColumnType
property, specify the data type of the new column (e.g., String, Integer, etc.).
In the DefaultValue
property, specify the default value for the new column. This value will be used for all rows in the data table.
Thanks!!!
2 Likes
balupad14
(Balamurugan)
December 21, 2022, 11:09am
4
Hi @supermanPunch ,
Here is a simple sample for you.
DatatableAddColumn.zip (72.9 KB)
Regards
Balamurugna.S
system
(system)
Closed
December 24, 2022, 11:10am
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.