//prepare source format row
final int srcRownum = n <= 0 ? -1 : copyOrigin == Range.FORMAT_RIGHTBELOW ? startRow : copyOrigin == Range.FORMAT_LEFTABOVE ? startRow - 1 : -1;
final HSSFRow srcRow = srcRownum >= 0 ? getRow(srcRownum) : null;
final Map<Integer, Cell> srcCells = srcRow != null ? BookHelper.copyRowCells(srcRow, lCol, rCol) : null;
final short srcHeight = srcRow != null ? srcRow.getHeight() : -1;
final HSSFCellStyle srcStyle = srcRow != null ? srcRow.getRowStyle() : null;
final int maxrow = SpreadsheetVersion.EXCEL97.getLastRowIndex();
if (endRow < 0) {
endRow = maxrow;
}