Krishna Jamadar
Krishna Jamadar

Reputation: 19

How to take control back to first column in excel sheet?

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

Answers (1)

Johannes Stadler
Johannes Stadler

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

Related Questions