I have a data table with unnamed columns. How do I loop through each column and add a name to each column?
I tried using a for each loop to iterate through DataColumns but I get error Option Strict On disallows implicit conversions from System.Data.DataTable to System.Collections.IEnumerable
This shows you the way to do it. You can come up with different ways to provide the new column names but this simple example should help. The output of this example looks like:
A simple table of names and ages. I changed Column2 to “Names” using the workflow