Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

execl转html报错d != org.apache.poi.ss.usermodel.FillPatternType #6932

Closed
q060831 opened this issue Jul 20, 2024 · 2 comments
Closed

execl转html报错d != org.apache.poi.ss.usermodel.FillPatternType #6932

q060831 opened this issue Jul 20, 2024 · 2 comments

Comments

@q060831
Copy link

q060831 commented Jul 20, 2024

版本号: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)
@zhangdaiscott
Copy link
Member

cr

@lsqGitHub716
Copy link

已修改,下版本发布

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants