File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes POI -  empty excel rows. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "POI -  empty excel rows." Watch "POI -  empty excel rows." New topic
Author

POI - empty excel rows.

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32769
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.


Android appsImageJ pluginsJava web charts
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
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
 
 
subject: POI - empty excel rows.
 
Threads others viewed
Copy particular rows in excel using POI
Read Excel Sheet Using Java
jexcel problem with empty cells
POI api to read MSExcel sheet
facing diffculties while comparing two excel sheet using poi
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture