Trying to loop through columns in datatable,need help

Want to loop through data columns,in below ss excel from RPA challenge website, i want to read columns values, please help.

@ankur_kaushik2

Use read range activity and read excel and then Use for each row in datatable activity and inside it use

Currentrow("ColumnName").ToString

Change column name to get different values…and for loop will take care of looping through each row

Cheers

Hi @ankur_kaushik2

there is any activity Read Column. You can use it to read values by specifying the starting cell.

Hope this is helpful

Hi,

Perhaps you could first determine the number of total columns in the datatable by using:
dt.Columns.Count

Then, when you want to call the first column value till the last column value you could call it using the column index until all columns are exhausted.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.