CopyToDatatable is not part of Member of System.Data.EnumerableRow

I am,getting below error while writing linQ query.

“CopyToDatatable is not part of Member of System.Data.EnumerableRow”

Assembly reference is already present in xaml file.

Can anyone help?

Hi @sayali_gujarathi1

When you are writing the linq querey and storing in a variable. Make sure to be variable datatype in datatable datatype.

Hope it helps!!

Why not just use the Add Data Row activity?

Hi @mkankatala , Variable is datatable only.
Please find thr image

Hi @sayali_gujarathi1

Right-click on this xaml (or Main xaml) and open it using Notepad. You will see a lot of code, into which you need to add the following line:


Do it here:


Hope this helps,
Best Regards.

Hi @arjunshenoy .

Thus,reference is already present.

Select(Function (x)… will select the column values but not the rows, so we cannot apply copytodatatable

Maybe you want to do:

dtSmall = dtOrig.DefaultView.ToTable(false, {"Europe"})

Hi @ppr ,

I want to read the all values from column name “Europe” as I put in the query as well.

we answered with
dtSmall = dtOrig.DefaultView.ToTable(false, {"Europe"})

1 Like


Thanks. It worked.

Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum