
I have an excel file, it contains 'n' no.of sheets(the no.of sheets will be dynamic ) .I want to read all sheets one by one in java by using POI jar. I am able to read one sheet at a time by using POI jar(workbook.getSheetAt(0)). But I am not able to read multiple sheets one by one. Could you please let me know the method to count the no.of sheets in excel through POI jar or else java.

Use the method getNumberOfSheets()of HSSFWorkBook class to count the number of sheets in an excel file.

thank you Deepak....
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.