How to get the row count in a excel sheet with Apache POI with Event API
I am using Apache POI Event API to read large excel worksheets.
The whole operation is lenghy, becouse I have to put all the data to database. I would like to display progress of import, ie
Processing sheet 1 of 5, row 5123 of 40000.
At the begining of file there are all sheets declared, so no problem with sheet count.
Is there a record at the begining of a file or a sheet from which I could read the number of rows in the sheet? If so, which record it is and which property I should check to find out the number of rows?
Or the only way to determine the number of rows is to wait until all row records ar read?
There are methods for getting the number of rows in a sheet:
getLastRowNum()
and
getPhysicalNumberOfRows()
链接地址: http://www.djcxy.com/p/37976.html