# Cell Merging

## Content



FlexSheet supports excel-like merging of cells on the client side, unlike FlexGrid which enables content-driven cell merging, FlexSheet allows you to combine adjacent cells containing any data/value into one. When you merge a group of cells, the contents/value/data from the upper-leftmost cell is preserved in the merged cell.

You can merge the selected cells of a sheet into one by invoking the **mergeRange()** method. However if your selection contains already merged cell(s), then the mergeRange method will un-merge the merged cell(s).

The following sections demonstrate how to merge cells using the following:

*   [Merging cells at runtime](/componentone/docs/mvc/online-mvc-core/WorkingwithControls/FlexSheet/Work-with-FlexSheet/CellMerging/Merging-Cells-at-Run-time)
*   [Merging cells programmatically](/componentone/docs/mvc/online-mvc-core/WorkingwithControls/FlexSheet/Work-with-FlexSheet/CellMerging/Merging-Cells-Programmatically)


> type=note
> **Note**: Note that, FlexSheet also supports FlexGrid like merging on the server side.