Read header name of internal table when it's looping


#1

Hi! I have a table gets from an CSV and I need to get some column names (because some columns name are dynamic). Inside for each row, can I get the column names?


#2

hi @Maru1

I knows it depends but you should prefer excel because you will get lot of things with excel easy and useful but finally it is your choice.

In uipath you will get an excel scope as well so you can perform operations even that excel is opened in the background.

https://www.uipath.com/activities-guide/excel-application-scope

I am attaching a sample solution, so review it and let me know :slight_smile:
GetColumnNames.zip (1.9 KB)

Regards…!!


#3

Hi,

You can access the columns collection from the row by using:
yourRow.Table.Columns
Then you can iterate over them etc. just as you’d access them from DataTable level (in reality it’s a copy of the schema, but unless you’re modifying the DT midway, it’s not an issue).

Regards.