Sometimes, you'd like to just Iterate over all the rows in a sheet, or all the cells in a row. This is possible with a simple for loop. Luckily, this is very easy. Row defines a CellIterator inner class to handle iterating over the cells (get one with a call to row.cellIterator(), and Sheet provides a rowIterator() method to give an iterator over all the rows.
This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here