You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varworkbook=newXLWorkbook();varws=workbook.Worksheets.Add("Merge Cells");// Merge a rowws.Cell("B2").Value="Merged Row(1) of Range (B2:D3)";ws.Range("B2:D3").Row(1).Merge();// Merge a columnws.Cell("F2").Value="Merged Column(1) of Range (F2:G8)";ws.Cell("F2").Style.Alignment.WrapText=true;ws.Range("F2:G8").Column(1).Merge();// Merge a rangews.Cell("B4").Value="Merged Range (B4:D6)";ws.Cell("B4").Style.Alignment.Horizontal=XLAlignmentHorizontalValues.Center;ws.Cell("B4").Style.Alignment.Vertical=XLAlignmentVerticalValues.Center;ws.Range("B4:D6").Merge();// Unmerging a range...ws.Cell("B8").Value="Unmerged";ws.Range("B8:D8").Merge();ws.Range("B8:D8").Unmerge();workbook.SaveAs("MergeCells.xlsx");