Foreach error

There is an error in the for each loop. I’m reading a data from excel & I need print all names. Tried everything but error is there, what to do?

@gaurav2000

Can you please explain in detailed about what you want to do and what you tried and what error it is…that way we can help you better…

Cheers

@gaurav2000

As I can see, the TypeArgument is set to ‘String’. You need to do this:

  1. Either you can change the For Each’s TypeArgument to System.Data.DataRow.
  2. Or you can simply use For Each Row in Datatable instead of For Each. (Since you are iterating through a datatable)

Hope this helps,
Best Regards.

1 Like

Hii @gaurav2000 ,
Can you just change the Data type in the properties panel to System.DataTable?

Or you can use for each row in data table activity

1 Like

@gaurav2000

If you want to loop datatable you can directly use for each row in datatable activity instead of for each activity

Cheers

1 Like

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