Update row merge start index to merged cell.
@param {Array.<Array.<object>>} tableData - table data
@param {number} startColIndex - start col index
@param {number} endColIndex - end col index
@private
483344
function _updateMergeStartIndex(tableData, startColIndex, endColIndex) {
  tableData.forEach(rowData => {
    rowData.slice(endColIndex + 1).forEach(cellData => {
      if (util.isExisty(cellData.colMergeWith) && cellData.colMergeWith >= startColIndex) {
        cellData.colMergeWith = endColIndex + 1;
      }
    });
  });
}
1225407
private void updateRowAdditionsInternal() {
		// correct table : fill empty cells/ parse table in table
		Row row;
		int prevRows = rows();
		int rowNumber = 0;
		int groupNumber = 0;
		boolean groupChange;
		int firstDataRow = table.getLastHeaderRow() + 1;
		Cell cell;
		PdfCell currentCell;
		ArrayList newCells = new ArrayList();
		int rows = table.size() + 1;
		float[] offsets = new float[rows];
		for (int i = 0; i < rows; i++) {
			offsets[i] = getBottom();
		}
        
		// loop over all the rows
		for (Iterator rowIterator = table.iterator(); rowIterator.hasNext(); ) {
			groupChange = false;
			row = (Row) rowIterator.next();
			if (row.isEmpty()) {
				if (rowNumber < rows - 1 && offsets[rowNumber + 1] > offsets[rowNumber]) offsets[rowNumber + 1] = offsets[rowNumber];
			}
			else {
				for(int i = 0; i < row.getColumns(); i++) {
					cell = (Cell) row.getCell(i);
					if (cell != null) {
						currentCell = new PdfCell(cell, rowNumber+prevRows, positions[i], positions[i + cell.getColspan()], offsets[rowNumber], cellspacing(), cellpadding());
						if (rowNumber < firstDataRow) {
							currentCell.setHeader();
							headercells.add(currentCell);
							if (!table.isNotAddedYet())
								continue;
						}
						try {
							if (offsets[rowNumber] - currentCell.getHeight() - cellpadding() < offsets[rowNumber + currentCell.rowspan()]) {
								offsets[rowNumber + currentCell.rowspan()] = offsets[rowNumber] - currentCell.getHeight() - cellpadding();
							}
						}
						catch(ArrayIndexOutOfBoundsException aioobe) {
							if (offsets[rowNumber] - currentCell.getHeight() < offsets[rows - 1]) {
								offsets[rows - 1] = offsets[rowNumber] - currentCell.getHeight();
							}
						}
						currentCell.setGroupNumber(groupNumber);
						groupChange |= cell.getGroupChange();
						newCells.add(currentCell);
					}
				}
			}
			rowNumber++;
			if( groupChange ) groupNumber++;
		}
        
		// loop over all the cells
		int n = newCells.size();
		for (int i = 0; i < n; i++) {
			currentCell = (PdfCell) newCells.get(i);
			try {
				currentCell.setBottom(offsets[currentCell.rownumber()-prevRows + currentCell.rowspan()]);
			}
			catch(ArrayIndexOutOfBoundsException aioobe) {
				currentCell.setBottom(offsets[rows - 1]);
			}
		}
		cells.addAll(newCells);
		setBottom(offsets[rows - 1]);
	}
71664
public void setRowsSpanned(final Table table, final TableAppender appender, final int rowIndex,
                               final int colIndex, final int n) throws IOException {
        if (n <= 1) return;

        final TableCell firstCell = this.getRowSecure(table, appender, rowIndex, false)
                .getOrCreateCell(colIndex);
        if (firstCell.isCovered()) return;

        firstCell.markRowsSpanned(n);
        this.coverCellsBelow(table, appender, rowIndex, colIndex, n);
    }
231687
public void setupCellPositoin(final int rowIndex, final int columnIndex) {
        
        if(topLeftPoisitoin == null) {
            this.topLeftPoisitoin = new Point(columnIndex, rowIndex);
        }
        
        if(bottomRightPosition == null) {
            this.bottomRightPosition = new Point(columnIndex, rowIndex);
        }
        
        // 左上のセルの位置の設定
        if(topLeftPoisitoin.x > columnIndex) {
            this.topLeftPoisitoin.x = columnIndex;
        }
        
        if(topLeftPoisitoin.y > rowIndex) {
            this.topLeftPoisitoin.y = rowIndex;
        }
        
        // 右下のセルの位置の設定
        if(bottomRightPosition.x < columnIndex) {
            this.bottomRightPosition.x = columnIndex;
        }
        
        if(bottomRightPosition.y < rowIndex) {
            this.bottomRightPosition.y = rowIndex;
        }
    }
449322
function (cell) {
            try {
                var start = domUtils.getXY(cell).x + cell.offsetWidth,
                    rows = this.table.rows, cells , returns = [];
                for (var i = 0; i < this.rowsNum; i++) {
                    cells = rows[i].cells;
                    for (var j = 0, tmpCell; tmpCell = cells[j++];) {
                        var tmpStart = domUtils.getXY(tmpCell).x;
                        if (tmpStart > start) break;
                        if (tmpStart == start && tmpCell.colSpan == 1) {
                            returns.push(tmpCell);
                            break;
                        }
                    }
                }
                return returns;
            } catch (e) {
                showError(e);
            }
        }
1159148
function syncTableData () {

    var tableData = getTableData();

    for ( var i = 1, row; row = editorTable.rows[ i ]; i++ ) {

        for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {

            cell.innerHTML = tableData[ i ] [ j ];

        }

    }

}
187881
private void processSavingNestedMergedRecord(final Sheet sheet, final int mergedSize,
            final List<CellPosition> valueCellPositions) {

        if(mergedSize <= 1) {
            return;
        }

        // ネストした場合、上のセルのスタイルをコピーして、結合する
        for(CellPosition position : valueCellPositions) {
            Cell valueCell = POIUtils.getCell(sheet, position);
            if(valueCell == null) {
                continue;
            }

            final CellStyle style = valueCell.getCellStyle();

            // 結合するセルに対して、上のセルのスタイルをコピーする。
            // 行を挿入するときなどに必要になるため、スタイルを設定する。
            for(int i=1; i < mergedSize; i++) {
                Cell mergedCell = POIUtils.getCell(sheet, position.getColumn(), position.getRow() + i);
                mergedCell.setCellStyle(style);
                mergedCell.setCellType(CellType.BLANK);
            }

            final CellRangeAddress range = new CellRangeAddress(position.getRow(), position.getRow()+ mergedSize-1,
                    position.getColumn(), position.getColumn());

            // 既に結合済みのセルがある場合、外す。
            for(int rowIdx=range.getFirstRow(); rowIdx <= range.getLastRow(); rowIdx++) {
                CellRangeAddress r = POIUtils.getMergedRegion(sheet, rowIdx, position.getColumn());
                if(r != null) {
                    POIUtils.removeMergedRange(sheet, r);
                }
            }

            sheet.addMergedRegion(range);
        }

    }
271506
function mergeData (to, from) {
	  var key, toVal, fromVal;
	  for (key in from) {
	    toVal = to[key];
	    fromVal = from[key];
	    if (!hasOwn(to, key)) {
	      set(to, key, fromVal);
	    } else if (isObject(toVal) && isObject(fromVal)) {
	      mergeData(toVal, fromVal);
	    }
	  }
	  return to
	}
205989
public void fill(final double[][] data, final int startRow, final int startCol) {
		final int rows = data.length;
		final int cols = data[0].length;

		verifyTrue(startRow < rows && startRow < getRowCount(), "illegal startRow: %s", startRow);
		verifyTrue(startCol < cols && startCol < getColumnCount(), "illegal startCol: %s", startCol);
		verifyTrue(rows <= getRowCount(), "too many rows in input: %s: max allowed = %s", rows,
				getRowCount());
		verifyTrue(cols <= getColumnCount(), "too many columns in input: %s: max allowed = %s",
				cols, getColumnCount());

		for (int i = startRow; i < rows; i++) {
			for (int j = startCol; j < cols; j++) {
				setDouble(data[i][j], i, j);
			}
		}
	}
973200
def mergeTablets(self, login, tableName, startRow, endRow):
    
    self.send_mergeTablets(login, tableName, startRow, endRow)
    self.recv_mergeTablets()
898067
def merge_cells(start_row, start_col, end_row, end_col)
      validate_workbook

      self.merged_cells ||= RubyXL::MergedCells.new
      # TODO: add validation to make sure ranges are not intersecting with existing ones
      merged_cells << RubyXL::MergedCell.new(:ref => RubyXL::Reference.new(start_row, end_row, start_col, end_col))
    end
1362895
function updateCellData(wscell, data) {
        // console.log('data %s, %s', data, typeof data);
        if (data == null) return wscell;

        let cell = {};
        Object.assign(cell, wscell);
        Object.assign(cell, {
            v: data,
            w: data,
            t: 's',
            r: '<t>' + data + '</t>',
            h: data,
        });

        if (check.number(data)) cell.t = 'n';
        else if (typeof data === 'boolean') cell.t = 'b';
        else if (check.date(data) || getMoment(data).isValid()) {
            cell.t = 'n'; cell.z = xlsx.SSF._table[14];
            // console.log(datenum(getMoment(data).toDate().toString()));
            cell.v = datenum(getMoment(data).toDate().toString());
            // FIXME:portability OSX
        }
        return cell;
    }
1355325
public void addRow(int rowIndex, Table sourceTable) {
        for (int i = 0; i < columnCount(); i++) {
            column(i).appendObj(sourceTable.column(i).get(rowIndex));
        }
    }
1283485
private void fixCellValue(MergeRow mergeRowAnn, int fromRow, int col) {
        val sep = mergeRowAnn.prefixSeperate();
        if (StringUtils.isEmpty(sep)) return;

        val cell = sheet.getRow(fromRow).getCell(col);
        val old = PoiUtil.getCellStringValue(cell);
        val fixed = substringAfterSep(old, sep);

        PoiUtil.writeCellValue(cell, fixed);
    }
907777
function updateTableDom() {
  const tableBody = this.ui.tableBody;

  /* Empty the table body to prepare for sorting the rows
     TODO: It might make sense to use innerHTML
     from a performance and garbage collection standpoint. */
  while ( tableBody.lastChild ) {
    tableBody.removeChild( tableBody.lastChild );
  }

  const documentFragment = document.createDocumentFragment();
  for ( let i = 0; i < this.tableData.length; i++ ) {
    documentFragment.appendChild( this.tableData[i][1] );
  }

  tableBody.appendChild( documentFragment );
  this.trigger( 'table:updated' );

  return tableBody;
}
662543
function _pickContent(targetRows, startColIndex, endColIndex) {
  const limitColIndex = endColIndex + 1;
  const cells = [].concat(...targetRows.map(rowData => rowData.slice(startColIndex, limitColIndex)));
  const foundCellData = cells.filter(({content}) => content && content !== BASIC_CELL_CONTENT);

  return foundCellData.length ? foundCellData[0].content : BASIC_CELL_CONTENT;
}
905421
@SuppressWarnings("unchecked")
  private int mergeRange(ParentSoyNode<?> parent, int start, int lastNonEmptyRawTextNode, int end) {
    checkArgument(start < end);
    if (start == -1 || end == start + 1) {
      return end;
    }
    // general case, there are N rawtextnodes to merge where n > 1
    // merge all the nodes together, then drop all the raw text nodes from the end
    RawTextNode newNode =
        RawTextNode.concat(
            (List<RawTextNode>) parent.getChildren().subList(start, lastNonEmptyRawTextNode + 1));
    ((ParentSoyNode) parent).replaceChild(start, newNode);
    for (int i = end - 1; i > start; i--) {
      parent.removeChild(i);
    }
    return start + 1;
  }