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

使用autopoi导入提示缺少方法 #2868

Closed
volfiening opened this issue Aug 5, 2021 · 2 comments
Closed

使用autopoi导入提示缺少方法 #2868

volfiening opened this issue Aug 5, 2021 · 2 comments

Comments

@volfiening
Copy link

版本号:

v2.4.5

问题描述:

使用autopoi导入时报错

截图&代码:

entity实体:
@DaTa
@TableName("testuser")
public class TestUser implements Serializable {
private static final long serialVersionUID = 1L;

@TableId(type = IdType.ASSIGN_ID)
private int id;

@Excel(name = "用户id")
private String userid;

@Excel(name = "用户名",width = 30)
private String username;

}
controller代码:
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
List files = multipartRequest.getFiles("file");
MultipartFile file = files.get(0);

        //导入excel
        ImportParams params = new ImportParams();
        params.setHeadRows(0);
        params.setSheetNum(1);
        params.setNeedSave(false);
        boolean flag = ExcelImportCheckUtil.check(file.getInputStream(),TestUser.class,params);
        if(!flag) return Result.error("导入失败,请检查");
        ExcelImportUtil.importExcel(file.getInputStream(),TestUser.class,params);//这一行执行报 没有该方法 isNullObject
        return Result.OK("导入成功");

--------错误日志
2021-08-05 13:23:04.149 [http-nio-8080-exec-3] INFO o.j.poi.excel.imports.ExcelImportServer:423 - >>> poi3升级到4.0兼容改造工作, isXSSFWorkbook = false
没有该方法 isNullObject
没有该方法 isNullObject
没有该方法 isNullObject
没有该方法 isNullObject
没有该方法 isNullObject
没有该方法 isNullObject
没有该方法 isNullObject

@zhangdaiscott
Copy link
Member

收录 ty

@zhangdaiscott
Copy link
Member

目前影响功能吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants