alibaba/easyexcel

CellWriteHandler 获取Cell所在行的其他Cell数据

Open

#4,019 opened on Oct 11, 2024

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Java (33,728 stars) (7,599 forks)batch import
help wanted

Description

问题描述

在业务逻辑中,单元格的样式需要依据 同一行的其他单元格进行变化,想到的是在CellWriteHandler获取当前Cell所在行的对象。使用以下代码返回空指针,实际该行是由数据的。

int currentRowIndex = cell.getRowIndex(); writeSheetHolder.getSheet().getRow(currentRowIndex);

Contributor guide