var grp=from k in excelFile.Worksheet(sheetName).ToList() select k; var grouped = from row in grp group row by row["Issue Type"] into g select new { edd = g.Key, c = g.Sum(row => Convert.ToDouble(row["Time Spent"])) }; foreach (var groupe in grouped) MessageBox.Show("key is" + groupe.edd + " : Sum=" + groupe.c);
int sum = 0; var grp=from k in excelFile.Worksheet(sheetName).ToList() select k; var grouped = grp.GroupBy(row => row["Issue Type"]); foreach (var g in grouped) { sum = g.Sum(t => Convert.ToInt32(t["Time Spent"])); MessageBox.Show("key=" + g.Key + "sum=" + sum); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)