My data is stored in a format(look down): [-] means a blank cell, on the right may be only 10 columns, after the space. Something like this:
[string0]
If I am clear you just want to filter your first column string and rest seperately.
Why not you just use a simple counter for this:
while(rowIterator.hasNext()) {
Row row = rowIterator.next();
String RowContent = null;
Iterator 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 will give concatenation of each cells of a single row in each iteration.