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

cellIndex不会自增 #1346

Closed
iWuYc opened this issue May 25, 2020 · 1 comment
Closed

cellIndex不会自增 #1346

iWuYc opened this issue May 25, 2020 · 1 comment
Labels
developing This feature will be added in future releases pending verification This problem needs to be confirmed

Comments

@iWuYc
Copy link

iWuYc commented May 25, 2020

|| ignoreMap.containsKey(filedName) || writeContext.currentWriteHolder().ignore(filedName, cellIndex);

在该行,如果在WriteSheet配置了includeIndex,并且cellIndex=0的时候,是不包含在内的时候,if (uselessData)为0,则,后面的数据都不会填充到指定的单元格中。

 final ExcelWriterSheetBuilder sheetBuilder = new ExcelWriterSheetBuilder();
        sheetBuilder.includeColumnIndexes(this.includeIndex()).needHead(true).head(this.head);
        return sheetBuilder.build();
// 该用例中所有的判断都为false
boolean uselessData = !beanMap.containsKey(filedName) || beanMapHandledSet.contains(filedName)
                || ignoreMap.containsKey(filedName) || writeContext.currentWriteHolder().ignore(filedName, cellIndex);

相同的,因为cellIndex的自增是在if (uselessData)之后,则表示,如果该段代码出现过一次uselessData=false,则后续的数据都不会被填充。

@zhuangjiaju zhuangjiaju added pending verification This problem needs to be confirmed developing This feature will be added in future releases labels Jun 9, 2020
@zhuangjiaju
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developing This feature will be added in future releases pending verification This problem needs to be confirmed
Projects
None yet
Development

No branches or pull requests

2 participants