Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

prontFonts方法里数组越界 #39

Open
lulee007 opened this issue Apr 12, 2021 · 0 comments
Open

prontFonts方法里数组越界 #39

lulee007 opened this issue Apr 12, 2021 · 0 comments

Comments

@lulee007
Copy link

https://github.com/zhangdaiscott/autopoi/blob/5feedad660516a08193f4c7845e8970d50a1a03c/autopoi/src/main/java/org/jeecgframework/poi/excel/html/helper/StylerHelper.java#L86

//Line 86
for (short i = 0, le = wb.getNumberOfFonts(); i <= le; i++) {
	Font font = wb.getFontAt(i);
	out.format(".%s .%s {%n", DEFAULTS_CLASS, "font_" + i + "_" + cssRandom);
	fontStyle(font);
	out.format("}%n");
}

版本:1.3

java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
	at java.util.ArrayList.get(ArrayList.java:433)
	at org.apache.poi.xssf.model.StylesTable.getFontAt(StylesTable.java:382)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.getFontAt(XSSFWorkbook.java:982)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.getFontAt(XSSFWorkbook.java:123)
	at org.jeecgframework.poi.excel.html.helper.StylerHelper.prontFonts(StylerHelper.java:72)
	at org.jeecgframework.poi.excel.html.helper.StylerHelper.printInlineStyle(StylerHelper.java:66)
	at org.jeecgframework.poi.excel.html.helper.StylerHelper.<init>(StylerHelper.java:60)
	at org.jeecgframework.poi.excel.html.ExcelToHtmlServer.printPage(ExcelToHtmlServer.java:55)
	at org.jeecgframework.poi.excel.ExcelToHtmlUtil.toTableHtml(ExcelToHtmlUtil.java:25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant