Load from List<People> instead of dataset

Jun 25, 2012 at 8:04 PM


I just found this libray and have been trying out the sample codes.  I can't seem to find

any method that allows me to load a List<> of objects to export to Excel.  This code below works fine for loading a dataset but is there any method for loading a collection like List<People> ?

ExcelPackage pack = new ExcelPackage();

            foreach (DataTable tbl in ds.Tables)
                ExcelWorksheet ws = pack.Workbook.Worksheets.Add(tbl.TableName);
                ws.Cells["A1"].LoadFromDataTable(tbl, true);

Jun 25, 2012 at 9:51 PM

You are looking for LoadFromCollection<T>.