/// <summary> /// adds a merged region of cells (hence those cells form one) /// </summary> /// <param name="region">region (rowfrom/colfrom-rowto/colto) to merge</param> /// <returns>index of this region</returns> public int AddMergedRegion(NPOI.SS.Util.CellRangeAddress region) { region.Validate(SpreadsheetVersion.EXCEL97); // throw IllegalStateException if the argument CellRangeAddress intersects with // a multi-cell array formula defined in this sheet ValidateArrayFormulas(region); return _sheet.AddMergedRegion(region.FirstRow, region.FirstColumn, region.LastRow, region.LastColumn); }