我无法返回值,有人可以帮我吗 如何返回以下值?
String invoiceNumber ;
Iterator<Sheet> sheetIt = wb.sheetIterator();
while (sheetIt.hasNext()) {
Sheet sheet= sheetIt.next();
Iterator<Row> rowIterator = sheet.rowIterator();
while (rowIterator.hasNext()) {
Row row = rowIterator.next();
Iterator<Cell> cellIt = row.cellIterator();
while (cellIt.hasNext()) {
Cell cell = cellIt.next();
if(cell.getStringCellValue().equals("Invoice Number")) {
invoiceNumber= row.getCell(cell.getColumnIndex()+1).getStringCellValue();
}
}
}
}