How to extract string from excel column into array of string?

As per title. I have excel with list of string, which I want to assign to array of string variable. I have used read column activity, but don’t know how to assign to array of string. Purpose of array of string is to check if mystringvariable.Contains(strarrayvariable)

assign this to array of string (where columnName = your column name)

dt.AsEnumerable.Select(function(row) row("ColumnName").toString).ToArray

Hi, thank you for your reply. What if I do not have ColumnName?

then use column index e.g. if you want to use 1st columnn type row(0)

dt.AsEnumerable.Select(function(row) row(0).toString).ToArray

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