AddRegion Method

Summary

Adds a new merged cell region to the sheet based on the specified cell range. Facilitates the merging of multiple cells into a single cell region.

Syntax

TypeScript
JavaScript
MergedCellRegions.prototype.addRegion = function( 
   range 
) 
addRegion( 
   range: CellRange 
): number; 

Parameters

range

A CellRange object specifying the start and end cells of the region to be merged. The range must encompass more than one cell.

Return Value

The index of the newly added merged cell region within the collection of merged regions. Returns -1 if the specified range is invalid or the merge operation fails.

Remarks

Merging cells is a powerful formatting feature in Excel, often used to create visually appealing headers, labels, or to group related data. However, it is important to use this feature to maintain the workbook's usability and integrity.

Requirements

Target Platforms

See Also

MergedCellRegions Class

MergedCellRegions Members

Leadtools.Document.SheetEditor Namespace

Help Version 23.0.2024.5.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.SheetEditor Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.