Reputation: 19
I have a while condition which is Row r;
while(row.hasnext())
{
r = row.next();
}
I want after the end of execution the control should go back to the first cell.
Upvotes: 0
Views: 305
Reputation: 797
You cannot "reset" your row iterator, but you can just get a new one:
Iterator<Row> row = sheet.rowIterator();
Or did I get the question wrong? Then please clarify what type "row" is.
Upvotes: 1