How to create excel file with multiple sheets from DataSet using C#. I have successfully created an excel file with single sheet. But I am not able to do that for multiple
var groupedSheetList = UserData .GroupBy (u => u.date) .Select (grp => grp.ToList ()) .ToList ();
You can try this
using (var package = new ExcelPackage ()) { foreach (var item in groupedSheetList) { var workSheet = package.Workbook.Worksheets.Add (item[0].date); } }