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
posted
0
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.
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.