如果我很清楚,您只想过滤您的第一列字符串,然后单独休息。
为什么不为此使用一个简单的计数器:
while(rowIterator.hasNext()) { Row row = rowIterator.next(); String RowContent = null; Iterator<Cell> cellIterator = row.cellIterator(); while(cellIterator.hasNext()) { Cell cell = cellIterator.next(); RowContent=RowContent+cell.toString(); } //Code for saving RowContent or printing or whatever you want for text in complete row}RowContent将在每次迭代中串联单个行的每个单元格。



