I have a requirement where i have to generate the excel as below image
i am using EPPlus dll and i am able to export only datatable to excel directly with below c# code.
using (var package = new ExcelPackage(Template))
{
ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("Product_Reports");
worksheet.Cells["A1"].LoadFromDataTable(dt, true, TableStyles.Medium1);
worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns();
... remainig code
How to i add the heading "Product Statistics" and other data like "Total", "Sold Out" etc as shown in the image ??
The examples on eppplus's site should show you how to do all of this but here is a start: