I am fairly new to C#, but I was able to pull in data from an excel document to a datatable and also data from a sql stored procedure into a datatable. Now I need to loop through the excel datatable to find anything that does not match from the sql datatable. I would also like the matching to begin at a certain column name which is not necessarily the first column. Any ideas or pointers? Thank you!!
Here is my code
foreach (DataRow row in excelTb.Rows) // Loop over the rows.
{
Console.WriteLine("--- Row ---"); // Print separator.
foreach (var item in row.ItemArray) // Loop over the items.
{
Console.Write("Item: "); // Print label.
Console.WriteLine(item); // Invokes ToString abstract method.
}
}
Console.Read(); // Pause.*/