forked from github/dataease
fix(视图): 修复导出视图明细当有空值时报错的问题
This commit is contained in:
parent
cbd41dda6f
commit
418ef10bef
@ -755,19 +755,20 @@ public class PanelGroupService {
|
|||||||
cell.setCellStyle(cellStyle);
|
cell.setCellStyle(cellStyle);
|
||||||
//设置列的宽度
|
//设置列的宽度
|
||||||
detailsSheet.setColumnWidth(j, 255 * 20);
|
detailsSheet.setColumnWidth(j, 255 * 20);
|
||||||
} else {
|
} else if (cellValObj != null) {
|
||||||
// with DataType
|
try {
|
||||||
if ((excelTypes[j] == DeTypeConstants.DE_INT || excelTypes[j] == DeTypeConstants.DE_FLOAT) && StringUtils.isNotEmpty(cellValObj.toString())) {
|
// with DataType
|
||||||
try {
|
if ((excelTypes[j] == DeTypeConstants.DE_INT || excelTypes[j] == DeTypeConstants.DE_FLOAT) && StringUtils.isNotEmpty(cellValObj.toString())) {
|
||||||
cell.setCellValue(Double.valueOf(cellValObj.toString()));
|
cell.setCellValue(Double.valueOf(cellValObj.toString()));
|
||||||
} catch (Exception e) {
|
} else {
|
||||||
LogUtil.warn("export excel data transform error");
|
cell.setCellValue(cellValObj.toString());
|
||||||
}
|
}
|
||||||
} else {
|
} catch (Exception e) {
|
||||||
cell.setCellValue(cellValObj.toString());
|
LogUtil.warn("export excel data transform error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user