EasyXLS

Merge cells

EasyXLS™ library allows you to read merge areas or to export merge cells to Excel file.

Merging cells means combing two or more cells in one single cell. The text inside the first cell is spread over all the merged cells. The value from the merge area is kept in the cell from the left-upper corner of the area.

Source code sample

The below example shows how to export an Excel file with merge cells.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

The screen shot below represents the exported Excel file with merged cells generated by the code sample above. The worksheet has merged cells from A1 to C3.

Exported Excel file with merged cells


Available for: Professional, Excel Writer, Excel Reader
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

Office 365
MS Excel 2021 - 2024
MS Excel 2007 - 2019
MS Excel 97 - 2003
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT