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