2.1K Star 9.1K Fork 2.7K

悟耘开源 / easypoi

 / 详情

BUG ,在 EasyPOI 使用 Excel 转 HTML 时 中间空行poi 去读 row 为 null导致页面表格转换错误!

Done
Task
Opened this issue  
2019-05-29 14:05

源代码 ExcelToHtmlService 的ensureColumnBounds方法在获取有效row 的时候使用的是Iterator iter = sheet.rowIterator(); 因 apache POI 在读取 row 的时候如果内部的 cell 都为空该 row 及返回 null 在 Iterator iter 因使用 treeMap 存储 null 不存储,就出现了行缺失问题,可以采用sheet.getLastRowNum() 然后使用数字遍历,这样当对应的 row 为 null 则渲染一个空的 tr ,从而解决 table 在缺失 row 的情况下渲染错误的问题.

Comments (1)

whale created任务

已经按照这种逻辑修复

jueyue changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
参与者(2)
69288 jueyue 1578916179
Java
1
https://gitee.com/lemur/easypoi.git
git@gitee.com:lemur/easypoi.git
lemur
easypoi
easypoi

Search