How to loop and get column names inside a for each row?

I did use read range to read an excel and use for each row to loop , I wanted to print each column names , how do we do that inside a for each ? Thanks guys

@RajivKumar12

You can use like below

Use For Each Activitiy instead of For Each Row

Give as below

ForEach item in Dynamic_DT.Columns

So you can get the columnName by placing a messagebox inside the foreach and use item.ToString

Follow Link

Hope this clears you

Thanks

Is there a way @ksrinu070184 that I will only check the first row column? and not everything ?!

for example I only wanted to check the first row column which are Order date , region , items unit , unit costs and total and dont include the other columns

dddd|655x62

@RajivKumar12

You need only first column name or first row Column Value?

Please clear this

Thanks

I need the first column names only

@RajivKumar12

Try like below

Hope this helps you

Thanks

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