fix: 导出数据丢失

This commit is contained in:
taojinlong 2024-09-05 13:36:11 +08:00
parent 1370759c05
commit b4b7027ec6

View File

@ -284,12 +284,7 @@ public class ChartDataServer implements ChartDataApi {
detailsSheet.setColumnWidth(j, 255 * 20); detailsSheet.setColumnWidth(j, 255 * 20);
} else if (cellValObj != null) { } else if (cellValObj != null) {
try { try {
// with DataType cell.setCellValue(cellValObj.toString());
if ((excelTypes[j].equals(DeTypeConstants.DE_INT) || excelTypes[j].equals(DeTypeConstants.DE_FLOAT)) && StringUtils.isNotEmpty(cellValObj.toString())) {
cell.setCellValue(Double.valueOf(cellValObj.toString()));
} else {
cell.setCellValue(cellValObj.toString());
}
} catch (Exception e) { } catch (Exception e) {
LogUtil.warn("export excel data transform error"); LogUtil.warn("export excel data transform error");
} }