Search code examples
asp.netexcelepplus

How do I merge cells in EPPlus library, but in columns?


I can't seem to find any solution. I know of the MergeCells() property, but that only seems to work in rows. I need to merge cells from A2:A10 for instance. Or is there a way to use the existing function for vertical merging as well?


Solution

  • I have learned that the correct syntax is worksheet.Cells[FromRow, FromColumn, ToRow, ToColumn].Merge = true; Thanks everyone