Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Read Excel Sheet Using Java

 
Ranch Hand
Posts: 97
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
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • 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: 97
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
 
Rancher
Posts: 43011
76
  • 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?
 
Our first order of business must be this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!