Storing data from excel to list

I have to read Data from Excel sheets and store into List.

Please help,

Thanks in advance,
Regards…

@Reeba_Raju

outptdt.AsEnumerable.Select(Function(x) x).ToList

use this syntax to make to list

or

can you explain more your requirement

Cheers

I have to store names into list from excel sheet if it matches a if condition in workflow

Regards.

Hey you can do this way , make sure that your variable is of type list < datarow >

Regards

Hi @Reeba_Raju ,
You can read as dtData
dtData.AsEnumerable().Select(Function(g) g ).ToList
regards,
LNV

@Reeba_Raju

listvar=outptdt.AsEnumerable.Select(Function(x) x(“ColumnName”).ToString).ToList

x(“ColumnName”) is replaced by x("YourcolumnName)

The below synatx gives you true or false

outptdt.AsEnumerable.Any(Function(r) listvar.Contains(r(“ColumnName”).ToString))

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