|
@@ -253,22 +253,26 @@ public class ReadExcelUtils {
|
|
|
//查找列
|
|
|
int columns = firstRow.getLastCellNum();
|
|
|
for (int t = 0; t < columns; t++) {
|
|
|
- if (firstRow.getCell(t).toString().equals("申请号")) {
|
|
|
+ if (firstRow.getCell(t).toString().trim().equals("申请号")) {
|
|
|
ANOCellId = t;
|
|
|
}
|
|
|
- if (firstRow.getCell(t).toString().equals("公开号")) {
|
|
|
+ if (firstRow.getCell(t).toString().trim().equals("公开(公告)号")) {
|
|
|
PNOCellId = t;
|
|
|
}
|
|
|
}
|
|
|
for (int i = 1; i < rows; i++) {
|
|
|
Row row = sheet.getRow(i);
|
|
|
if (ANOCellId != null) {
|
|
|
- String appNo = row.getCell(ANOCellId).toString();
|
|
|
- appNos.add(appNo);
|
|
|
+ if(row.getCell(ANOCellId)!=null) {
|
|
|
+ String appNo = row.getCell(ANOCellId).toString();
|
|
|
+ appNos.add(appNo);
|
|
|
+ }
|
|
|
}
|
|
|
if(PNOCellId!=null){
|
|
|
- String publicNo=row.getCell(PNOCellId).toString();
|
|
|
- publicNos.add(publicNo);
|
|
|
+ if(row.getCell(PNOCellId)!=null) {
|
|
|
+ String publicNo = row.getCell(PNOCellId).toString();
|
|
|
+ publicNos.add(publicNo);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|