Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read Excel Sheet Using Java

 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 11878
195
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have updated the code using code tags. Please Assist, Many thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic