static public WorkSheet getCopyWorkSheetSelectedRows ( WorkSheet copyWorkSheet , ArrayList < String > rows ) throws Exception { ArrayList < String > columns = copyWorkSheet . getColumns ( ) ; WorkSheet workSheet = new WorkSheet ( rows , columns ) ; for ( String row : rows ) { for ( String col : columns ) { workSheet . addCell ( row , col , copyWorkSheet . getCell ( row , col ) ) ; } } workSheet . setMetaDataColumns ( copyWorkSheet . getMetaDataColumns ( ) ) ; workSheet . setMetaDataRows ( copyWorkSheet . getMetaDataRows ( ) ) ; return workSheet ; }
Create a copy of a worksheet . If shuffling of columns or row for testing a way to duplicate original worksheet