mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
优化合并单元格读取
This commit is contained in:
parent
7c2ce9731e
commit
da21e6b071
@ -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());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user