注意本例需要jxls的支持
/**
* copy all rows include styles from source sheet to target sheet
* @param srcSheet
* @param targetSheet
*/
public static void copySheet(HSSFSheet srcSheet, HSSFSheet targetSheet){
Iterator it = srcSheet.rowIterator();
while(it.hasNext()){
HSSFRow srcRow = (HSSFRow) it.next();
Util.copyRow(srcSheet, targetSheet, srcRow, targetSheet.createRow(srcRow.getRowNum()));
}
}