How to get only Headers from a DataTable in UiPath

What is the use of getting headers?

There were several uses of this but can’t really describe a scenario for this because this a step that is used in the middle of a process basing on a particular requirement.

But i can give you few examples here.

When we are working with some status report generation.

If you want to check a particular column that is exist in a DataTable.

How we can achieve this?

Firstly, we have to create a DataTable as shown below:

uipath

Here we have a DataTable which is DT.

Now we need to clone the DataTable that we created as shown below:

uipath

What is Clone?

Clone creates a new DataTable with the same structure as the original DataTable.

But doesn’t copy any data from old DataTable to new DataTable.

If you want to copy the whole data of the old DataTable along with the structure then use the Copy method.

The output looks like below:

rpa

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 *