private static void copySingleRow ( final Sheet srcSheet , final Sheet destSheet , final int sourceRowNum , final int destinationRowNum , final boolean checkLock , final boolean setHiddenColumn ) { // Get the source / new row Row newRow = destSheet . getRow ( destinationRowNum ) ; Row sourceRow = srcSheet . getRow ( sourceRowNum ) ; if ( newRow == null ) { newRow = destSheet . createRow ( destinationRowNum ) ; } newRow . setHeight ( sourceRow . getHeight ( ) ) ; // Loop through source columns to add to new row for ( int i = 0 ; i < sourceRow . getLastCellNum ( ) ; i ++ ) { // Grab a copy of the old/new cell copyCell ( destSheet , sourceRow , newRow , i , checkLock ) ; } if ( setHiddenColumn ) { ConfigurationUtility . setOriginalRowNumInHiddenColumn ( newRow , sourceRow . getRowNum ( ) ) ; } return ; }
Copy single row .