mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
优化合并单元格读取
This commit is contained in:
parent
7c2ce9731e
commit
da21e6b071
@ -9,6 +9,7 @@
|
||||
* 【core 】 DateUtil增加isLastDayOfMonth、getLastDayOfMonth方法(pr#824@Gitee)
|
||||
* 【core 】 AnnotationUtil类支持Lambda获取某注解属性值(pr#827@Gitee)
|
||||
* 【core 】 CharUtil.isBlank添加Hangul Filler字符(issue#I5UGSQ@Gitee)
|
||||
* 【poi 】 优化合并单元格读取(issue#I5UJZ1@Gitee)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【poi 】 修复ExcelReader读取只有标题行报错问题(issue#I5U1JA@Gitee)
|
||||
|
@ -479,10 +479,7 @@ public class CellUtil {
|
||||
* @since 5.4.5
|
||||
*/
|
||||
private static Cell getCellIfMergedRegion(Sheet sheet, int x, int y) {
|
||||
final int sheetMergeCount = sheet.getNumMergedRegions();
|
||||
CellRangeAddress ca;
|
||||
for (int i = 0; i < sheetMergeCount; i++) {
|
||||
ca = sheet.getMergedRegion(i);
|
||||
for (final CellRangeAddress ca : sheet.getMergedRegions()) {
|
||||
if (ca.isInRange(y, x)) {
|
||||
return SheetUtil.getCell(sheet, ca.getFirstRow(), ca.getFirstColumn());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user