Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

head是List时,内容单元格的样式不生效 #1339

Closed
NeoOU opened this issue May 22, 2020 · 1 comment
Closed

head是List时,内容单元格的样式不生效 #1339

NeoOU opened this issue May 22, 2020 · 1 comment
Assignees
Labels
bug Something isn't working pending verification This problem needs to be confirmed

Comments

@NeoOU
Copy link

NeoOU commented May 22, 2020

建议先去看文档
快速开始常见问题
触发场景描述
head是List时,内容单元格的样式不生效
触发Bug的代码
com.alibaba.excel.write.style.AbstractCellStyleStrategy#afterCellDispose

    @Override
    public void afterCellDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder,
        List<CellData> cellDataList, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) {
        if (isHead == null || head == null) { // isHead为false,head == null为true时直接返回了。不能执行setContentCellStyle(cell, head, relativeRowIndex)
            return;
        }
        if (isHead) {
            setHeadCellStyle(cell, head, relativeRowIndex);
        } else {
            setContentCellStyle(cell, head, relativeRowIndex);
        }
    }

提示的异常或者没有达到的效果
head是List时,内容单元格的样式不生效

@zhuangjiaju
Copy link
Collaborator

非常感谢您的意见,已经在最新版修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending verification This problem needs to be confirmed
Projects
None yet
Development

No branches or pull requests

2 participants