Hi,
I have a DataTable object , filled with rows from an excel spread.
The DataTable object has 12 columns , and I need to perform this query in C# since the outputted table will not be used in SQL but saved to Excel Sheet.

string stringQuery = "Select <colName1>,<colName2>,<sum(colName7) From <tableName> " + " Group By <colName1>,<colName2>;                            

If you have .net 3.5 you could read the values from excel into an array and use LINQ

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.