I am trying to get the values from column 18, Test to uppercase after the upload of the excel file but without any succes.

How exactly can I reach the values that are in a DataTable?
This is where I fill the DataTable with the values from the excel file:
using (OleDbDataAdapter adapter = new OleDbDataAdapter(command))
{
DataTable dataTable = new DataTable();
adapter.Fill(dataTable);
return dataTable;
}
I would like to have all the values in 18 to be uppercase.
Loop through all rows making the 18th columns data UpperCase:
foreach (DataRow row in dataTable.Rows)
{
row["Test"] = row["Test"].ToString().ToUpper();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With