permaculture playing cards
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "Read Excel  Sheet Using Java" Watch "Read Excel  Sheet Using Java" New topic

Read Excel Sheet Using Java

Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 94


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

Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

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: 94


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

Joined: Mar 22, 2005
Posts: 42965
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?
I agree. Here's the link:
subject: Read Excel Sheet Using Java
It's not a secret anymore!