Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
You don’t always want the same number of cells in every row or column. For example, you might want to put a title in a cell that spans several columns. Or, if creating an invoice, you might want fewer columns for the total. To make one cell from two or more cells, merge them. Microsoft Excel lets users select cells and merge them to structure the spreadsheet the way they want.
The result of merging and then splitting a range of cells formatted as the cells to the left in Microsoft Excel

Aspose.Cells supports this feature and can also merge cells in a worksheet. You may unmerge, or split, the merged cells too. A merged cell’s cell reference is the reference for the top-left cell in the originally selected range.
Note that when cells are merged, only the data in the top-left cell is retained. If there is data in the other cells in the range, that data is deleted.
Formatting, likewise, is based on the reference cell so that when you merge cells, the formatting settings of the top-left cell in the range are applied on the merged cell. When the cell is split, the new cells keep their original format settings.
The following steps describe how to merge cells in the worksheet using Microsoft Excel.
The Cells class has some useful methods for the task. For example, the method merge() merges the cells into a single cell within a specified range of the cells.
The following output is generated after executing the code below.
The cells (C6:E7) have been merged

The following example shows how to merge cells (C6:E7) in a worksheet.
The following steps describe how to split merged cells using Microsoft Excel.
The Cells class has a method named unMerge() that splits cells into their original state. The method unmerges the cells using the cell’s reference in the merged cell range.
The following example shows how to split the merged cells (C6). The example uses the file created in the previous example and splits the merged cells.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.