I am trying to extract the top row of a worksheet as a list or array that can be iterated to perform operations.
I used this as a guide:
I used a “Read Range” activity and assigned the result to a generic list with LINQ
dtData.Columns.Cast(Of DataColumn)().[Select](Function(x) x.ColumnName).ToList()
this produces a valid list as viewed in the immediate window
I used the resulting list in a “for each” activity which compiles but freezes upon stepping
into. Any ideas to correct this?
to get the column number in the worksheet
aInt32=dtData.columns.IndexOf(“ColumnName”)
to get the column letter in the worksheet
aString = convert.ToChar(i+65)
adjust for zero based array as you see fit.