What do you want to merge cells. You can do it as follows:
ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Demo"); ws.Cells["A1:G1"].Merge = true;
And keep using EPPlus. It is very good
Another formatting pattern:
using (ExcelRange Title = Cells[1, 1, 1, dt.Columns.Count]) { Title.Merge = true; Title.Style.Font.Size = 18; Title.Style.Font.Bold = true; Title.Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; Title.Style.Fill.BackgroundColor.SetColor(systemColor); Title.Style.VerticalAlignment = ExcelVerticalAlignment.Center; Title.Style.HorizontalAlignment = ExcelHorizontalAlignment.Center; Title.Style.TextRotation = 90; Title.Value = "This is my title"; }
source share