I am exporting a data table to Excel using EPPlus but I keep getting no results. I get a worksheet with headers and a label on the tab but no data. I verified that the tableadapter has data in it.
Here is my code:
FileInfo newFile = new FileInfo("c:\temp\fn.xlsx");
ExcelPackage epp = new ExcelPackage(newFile);
var ws = epp.Workbook.Worksheets.Add(acctno);
TransTableAdapter.FillByAcct(MSDataSet.TransWithName, acctno);
ws.Cells.LoadFromDataTable(MSDataSet.TransWithName, true, OfficeOpenXml.Table.TableStyles.Light8);
epp.Save();
epp.Dispose();
Please kindly help if you can. Thanks!