For Each error

hii
i am reading excel sheet through the workbook read range and the create a variable
and this variable insert in for each but i am getting error that is

give me solutions for this

Hi @kailas_jadhav

You should use For each row in datatable for looping through excel

Regards
Sudharsan

yes sir i am using but then too error is coming

You are using Studio pro or Studio X?

For studio X
image

For studio pro

Regards
Sudharsan

Dear Kailas,

I believe you are using For Each activity and not For Each Row activity.
You can loop through using both activities.
But to fix the error which you are facing, you have to follow as per attached screenshot.

You have used For Each activity So,

1.Convert the datatable to Enumerable - DataTableVariable.AsEnumerable
2.Set the datatype of item TypeArgument as - System.Data.DataRow

Alternate Way:
Use For Each Row in Data Table Activity as below:

If this helps,please mark this as the solution to help others.

Thanks,
Geetishree Rao

1 Like