-
Notifications
You must be signed in to change notification settings - Fork 195
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
读取单元格为空字符串问题 #102
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
excel文件在这里获取的 https://udi.nmpa.gov.cn/download.html
下段代码中list里的TestEntity2的属性全是空字符串【注意:下载后的excel我用wps编辑并保存后,又没问题了。但是此处的场景是一个文件夹内好几百个excel,我不可能每个文件都编辑一遍。。。】
最后断点也没定位到问题,只好在org.jeecgframework.poi.excel.imports.CellValueServer的getCellValue(String xclass, Cell cell, ExcelImportEntity entity)方法内加一层判断,不去执行setCellType()该方法。希望autopoi团队有更好的解决方案
//设置单元格类型
if(CellType.STRING != cell.getCellTypeEnum()){
cell.setCellType(CellType.STRING);
}
The text was updated successfully, but these errors were encountered: