Change DataTable Column Names in UiPath

When working with excel or directly from a Database while automating a business process we tend to change DataTable column names that usually received as input for the bot.

Let’s say we have an input excel file that consists of certain columns and from that we need to change one column name before sending it to the end business user.

The business user will validate the bot’s accuracy and perform any pending tasks that the bot failed to perform.

So, in this article we will see how we can achieve this.

Step1: The first thing is to build the DataTable in UiPath Studio as below:

change datatable column name

Here we can see the Column Names which are:

  • Name
  • Email

Now, we will try to change this Name column to First Name.

Step2: Drag and drop an Assign activity and in the To Property enter the below command:

change datatable column name

Here:

  • DT- It is our Build Data Table Output which has all the row and column values.

In all the columns that DataTable has, we are selecting the Name column which is a Column Name.

Now, we will see what to write in Value property which is as shown below:

change datatable column name

Here this will be the New Column Name that we will be replaced in the old Name.

With this the Name column in the DataTable will change to First Name.

Let’s see how the column name will get changed by using the below activity:

Activity Name: Output Data Table Activity

Which converts a Data Table to String then we can display that in the message box as below:

change datatable column name

As we can see the Column Name which is Name has changed to First Name in the output.

This is how we change datatable column names in UiPath and very useful topic when it comes to design the status reports for the business users.

Where they will calculate the ROI and all other things basing on the bot’s accuracy and performance.

Happy Learning!

Like this post then let your friends know about this-:

Leave a Reply

Your email address will not be published. Required fields are marked *