Pre Merge pull request !441 from ms/springboot3

pull/441/MERGE
ms 2 weeks ago committed by Gitee
commit 487fb2214a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -338,7 +338,10 @@ public class ExcelUtil<T>
Map<String, Integer> cellMap = new HashMap<String, Integer>();
// 获取表头
Row heard = sheet.getRow(titleNum);
for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++)
if (heard == null) {
throw new UtilException("文件标题行为空请检查Excel文件格式");
}
for (int i = 0; i < heard.getLastCellNum(); i++) // getPhysicalNumberOfCells()容易导致列索引错位
{
Cell cell = heard.getCell(i);
if (StringUtils.isNotNull(cell))

Loading…
Cancel
Save