JeecgBoot
JeecgBoot copied to clipboard
execl转html报错d != org.apache.poi.ss.usermodel.FillPatternType
版本号:3.7.0 jdk8, poi4.1.2,autopoi1.4.8
问题描述: autopoi的StylerHelper类的colorStyles方法异常
public void colorStyles(CellStyle style, Formatter out) {
HSSFCellStyle cs = (HSSFCellStyle) style;
// 这里格式化字符串要求的是数字,单是poi4.1.2getFillPattern方法返回的是FillPatternType枚举类
out.format(" /* fill pattern = %d */%n", cs.getFillPattern());
styleColor(out, "background-color", cs.getFillForegroundColor());
styleColor(out, "color", colors.getColor(cs.getFont(wb).getColor()));
}
错误截图: 图片上传不了,只能发这个了
2024-07-20 16:12:51.508 [http-nio-8080-exec-1] ERROR o.jeecg.common.exception.JeecgBootExceptionHandler:112 - d != org.apache.poi.ss.usermodel.FillPatternType
java.util.IllegalFormatConversionException: d != org.apache.poi.ss.usermodel.FillPatternType
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747)
at java.util.Formatter.format(Formatter.java:2520)
at java.util.Formatter.format(Formatter.java:2455)
at org.jeecgframework.poi.excel.html.helper.StylerHelper$HSSFHtmlHelper.colorStyles(StylerHelper.java:205)