xlsw.start();
xlsw.addRow( headsName );
if (beanClass==null || Map.class.isAssignableFrom(beanClass) ){
for (int i=0,len=data.size();i<len;i++){
Map record=(Map)data.get(i);
xlsw.addRow(BeanUtils.map2Array(record,properiesName));
}
}else{
for (int i=0,len=data.size();i<len;i++){
Object record= data.get(i);
xlsw.addRow( BeanUtils.bean2Array(record,properiesName,beanClass) );