How to convert IEnumerable object to DataTable object?

excel

#1

HI,

I want to copy a row from an excel sheet to another by using Read Row and Write Range Activities.
However, Write Range Activities have an error that IEnumerable cannot convert to DataTable. I also tried to covert by using Assign Activities, but I could not use CopyToDataTable method.
Do you have an idea??


#2

This might give an idea


How to click links for each row of a web chart
#3

Hi,

You probably need to have a datatable variable then use ImportRow method to add the row.

Or, you could also just use Read Range instead of Read Row and set the range for the row you want or rather even filter the datatable down to the row you want.


#4

Thank you @vvaidya and @ClaytonM!
I used Read Range which have a datatable variable,
then Write Range works!
I will also study about LinQ.
Thanks again for your help !