I have loaded an excel file using OleDB connection. The code loads the excel file to a DataGridView. Now I want to use the values of this datatable, lets say sum, multiply all rows or columns. Over the net I have found only the static approach of doing this:
object 1 = DATATABLE.Compute("sum(NameOfTable)", "").ToString();
But since I load different excel files, I need a more genuine way. I have tried several different ways - add the values to a List or an Array but it does not seem to work. How can I achieve this?