I have a data, in which I have grouped some columns in excel file.
If I have to insert another set of data to excel file, EPp Plus code is recreating entire file and clearing existing grouped by columns.
I need to keep the existing grouped columns.
ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
using (var package = new ExcelPackage(new FileInfo(outputExcelPath)))
{
// Open or create the worksheet
var sheet = package.Workbook.Worksheets["InvoiceDetails"];
if (sheet == null)
{
sheet = package.Workbook.Worksheets.Add("InvoiceDetails");
// Set up the header row for a new worksheet
SetupHeaderRow(sheet);
}
package.Save()
}