Hi,
I am trying to learn to save contents of column from an excel file, say column ‘A’ into an array variable. Can anyone help me with the syntax please. Thank you.
- Use Read Column activity to read the desired column data from excel. The result will be IEnumerable
- Convert the result to array by using Cast method. The result will be array of Strings.
ReadColumnResult.Cast(of String)().ToArray()
2 Likes
Hi @suwalruchan365,
1.Read excel data into a datatable by using of ReadRange Activity.The table called dtExcel.
2.Declare a Array Variable arrColumns.
3.Using assign activity , arrColumns = dtExcel.Columns.Cast(Of DataColumn)().Select(Function(x) x.ColumnName).ToArray()
Below the sample.
File :ColumnsARRAY.zip (9.2 KB)
Regards
Balamurugan
2 Likes