cell = row.createCell(j);
cell.setCellValue(map.get(columns[j])+"");
}
}
}else if(obj instanceof Model){
@SuppressWarnings("rawtypes")
Model model = (Model)obj;
Set<Entry<String, Object>> entries = model.getAttrsEntrySet();
if(columns.length==0){//未设置显示列,默认全部
int columnIndex=0;
for (Entry<String, Object> entry : entries) {
cell = row.createCell(columnIndex);
cell.setCellValue(entry.getValue()+"");
columnIndex++;
}
}else{
for (int j = 0, lenJ = columns.length; j < lenJ; j++) {
cell = row.createCell(j);
cell.setCellValue(model.get(columns[j])+"");
}
}
}else if(obj instanceof Record){
Record record = (Record)obj;