• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

POI - empty excel rows.

 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I just want to make sure if im doing it right.
I am using apache POI api for reading the excel file.
I hav to check the value in each cells of every row. First im iterating through the rows and then iterate through each cells in the row for validating the data.



is there any better approach ? Here im facing one problem, some rows doesnt have any data but POI is taking it a data row , i think its because there are changes in the default widhth and height of those rows. Is it possible to find empty rows ? getPhysicalNumberOfRows() count is returns blank rows too

Thanks,
Rajeev.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A row is a row, whether it contains any data or not. POI can't skip over them, or determine in a general way whether a row is empty. One persons definition of empty might differ from the next persons definition, e.g. "no values in a row" vs. "no values and no formatting". You will need to figure that out yourself.
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply !!

I thinks POI's definition for blank cell is a cell without any data and without any change in default cell size..

One more question, if im using the event driven meachanism of POI , is there any direct way to check if the row being read is current one or new one. I mean, is there any event which get triggered when POI reads a new row ? I couldn't find any help in the api.

Thanks,
Rajeev
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic