Compiler Error when using For each row loop activity


#1

Hello all,

I am getting a compiler error when I am trying to go through each row in a DataTable created using the Read CSV activity.

The specific error is : Value of type ‘System.Data.DataRowCollection’ cannot be converted to ‘System.Data.DataTable’

I am following the following UiPath Tutorial: Web Data Entry Automation. CSV to Salesforce - UiPath Studio

Any help would be greatly appreciated, thanks!

:slight_smile:


#2

Hi,

The video shows (very) old version - that’s at least 2 major versions behind.

Current ForEachRow accepts a DataTable argument, not DataRowCollection, so instead of passing dtContacts.Rows, just pass dtContacts.

Rest should be ok.

Regards,
Andrzej


#3

Okay, I think I have it working. Thanks Andrzej!