将null转为空串显示在excel
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user