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.
MergedCellRegions.prototype.addRegion = function(
range
)
range
A CellRange object specifying the start and end cells of the region to be merged. The range must encompass more than one cell.
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.
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.