|
@@ -168,11 +168,14 @@ public class TWorkcertificateController extends BaseController
|
|
|
try {
|
|
|
logger.info("读取行数:" + i);
|
|
|
Row row = sheet.getRow(i);
|
|
|
- int cellNum = row.getPhysicalNumberOfCells();
|
|
|
+ // int cellNum = row.getPhysicalNumberOfCells();
|
|
|
+ int cellNum = row.getLastCellNum();
|
|
|
TWorkcertificate entity = new TWorkcertificate();
|
|
|
for (int j = 0; j < cellNum; j++) {
|
|
|
Cell cell = row.getCell(j);
|
|
|
- cell.setCellType(CellType.STRING);
|
|
|
+ if (cell == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
String cellValue = ExcelUtils.getCellValue(cell);
|
|
|
logger.info("cellValue:" + cellValue);
|
|
|
if (j == 0) {
|