This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
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: 11465
    
  94

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: 42031
    
  64
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
 
GeeCON Prague 2014
 
subject: Read Excel Sheet Using Java