Commit 9643dbbf authored by Quxl's avatar Quxl

x

parent 4152889d
...@@ -103,7 +103,12 @@ public class ExcelUtil { ...@@ -103,7 +103,12 @@ public class ExcelUtil {
if(type == Date.class) { if(type == Date.class) {
cell.setCellValue(DateUtil.format((Date)obj)); cell.setCellValue(DateUtil.format((Date)obj));
} else { } else {
cell.setCellStyle(bodyStyle); HSSFCellStyle cellStyle = cell.getCellStyle();
if(cellStyle == null) {
cellStyle = bodyStyle;
}
cellStyle.setWrapText(true);
cell.setCellStyle(cellStyle);
cell.setCellValue(new HSSFRichTextString(String.valueOf(obj))); cell.setCellValue(new HSSFRichTextString(String.valueOf(obj)));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment