public <T> boolean write(List<T> list, Class<T> clazz) {
		
		List<Object[]> rows = ExcelBeanHelper.beanToExcelValueArrays(list, clazz);
		try {
			Sheet sheet = workbook.getSheetAt(0);
			for (int i = 2; i < rows.size(); i++) {
				Row excelRow = sheet.getRow(i);
				Object[] vals = rows.get(i);
				for (int j = 0; j < vals.length; j++) {
					Cell cell = excelRow.getCell(j);
					cell.setCellValue(vals[j] == null ? "" : vals[j].toString());
				}
			}
			workbook.write(outputStream);
			return true;
		} catch (IOException e) {
			LOG.error("流异常", e);
		} catch (Exception e) {
			LOG.error("其他异常", e);
		} 
		return false;
	}
public < T > boolean write ( List < T > list , Class < T > clazz ) { List < Object [ ] > rows = ExcelBeanHelper . beanToExcelValueArrays ( list , clazz ) ; try { Sheet sheet = workbook . getSheetAt ( 0 ) ; for ( int i = 2 ; i < rows . size ( ) ; i ++ ) { Row excelRow = sheet . getRow ( i ) ; Object [ ] vals = rows . get ( i ) ; for ( int j = 0 ; j < vals . length ; j ++ ) { Cell cell = excelRow . getCell ( j ) ; cell . setCellValue ( vals [ j ] == null ? "" : vals [ j ] . toString ( ) ) ; } } workbook . write ( outputStream ) ; return true ; } catch ( IOException e ) { LOG . error ( "流异常" , e ) ; } catch ( Exception e ) { LOG . error ( "其他异常" , e ) ; } return false ; }
将数据写入excel文件

@param list 数据列表
@param <T>  泛型
@return 写入结果