how to count no.of sheets in excel through POI jar as well as through Java?

how to count no.of sheets in excel through POI jar as well as through Java?

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.

View Answers

April 2, 2011 at 10:34 AM

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


April 4, 2011 at 2:32 PM

thank you Deepak....









Related Tutorials/Questions & Answers:
how to count no.of sheets in excel through POI jar as well as through Java?
how to read data from excel file through browse and insert into oracle database using jsp or oracle???
Advertisements
Access Excel file through JDBC
Convert the excel sheet data into oracle table through java or jsp
how to connect the database using hibernet through servlet/jsp through form
Creating Excel sheets - Java Beginners
How we can create a table through procedure ?
how to connect two databse through HibernateFramework
How to access session values through Ajax?
How to call print dialog box through JMenuItem?
how to call the print dialog box through JMenuItem
how to login form through spring dao module
how we can create website through java
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to sent mails through jsp application
How to set background of an excel sheet using POI - Java Magazine
difference between java5 and java6 - Java Beginners
Drawing a Shape in Excel Sheet
How to Create Excel Page Using JSP
how to display one image on jsp through java
about java1
how to call jsp variable through servlet
how to store the REsult Set values in array and loop through it in java?
how to store the REsult Set values in array and loop through it in java?

Ads