File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 11279
    
  59

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: 39548
    
  27
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 - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read Excel Sheet Using Java
 
Similar Threads
excel sheet data insertion
How can I analize Excel file with Apache POI?
A little help
Read Excel values and store in to Database
Java Code to export data to Excel