Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning 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
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Read Excel Sheet Using Java

 
Ranch Hand
Posts: 98
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: 98
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: 43016
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?
 
Fire me boy! Cool, soothing, shameless self promotion:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic