将null转为空串显示在excel

This commit is contained in:
zhouxiunai
2019-05-10 11:02:15 +08:00
parent b0ed00e930
commit 5ab1d9c81d
@@ -54,7 +54,10 @@ public class FltrController {
List<Object> row = new ArrayList();
for(ExcelHeaderDto headerData : lsData.getColumns() )
{
String cellData = String.valueOf(rowData.get(headerData.getKey()));
String cellData = String.valueOf(
rowData.get(headerData.getKey()) == null ? "" : rowData.get(headerData.getKey())
);
row.add(cellData);
}
rows.add(row);