wood burning stoves 2.0*
The moose likes Java in General and the fly likes Read Excel  Sheet Using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Read Excel  Sheet Using Java" Watch "Read Excel  Sheet Using Java" New topic
Author

Read Excel Sheet Using Java

Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 93

Hi

Im using the POI API to read an excel sheet using the Below code





When I try to run this program, It reads/Prints all the cells in the excel sheet i.e the program also reads the cells that does not have any values in it. How do I make the code to read only the cells/ Rows that has values and does not read the empty cells.

Please Assist. Many Thanks

Regards
Varshini
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

As you have been asked many times before, please use the UBB code button to indent your code - it makes it much easier to read.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 93

Hi,

I have updated the code using code tags. Please Assist, Many thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41073
    
  43
There's no way to know that a cell is empty before its contents have been examined, so what you ask is impossible. What problem are you facing that you think can be solved by somehow skipping empty cells? What prevents you from adding code that checks whether cells are empty?


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read Excel Sheet Using Java
 
Similar Threads
A little help
Java Code to export data to Excel
Read Excel values and store in to Database
How can I analize Excel file with Apache POI?
excel sheet data insertion