How to eliminate empty rows in excel upload from PHP using PHPExcel upload?

abo7mead

New Member
i am in the middle of the development. i want to eliminate the empty rows while upload a excel from PHP using PHP excel plugin.\[code\]while($x<=$excel->sheets[0]['numRows']){$y=1;while($y<=$excel->sheets[0]['numCols']){$cell = isset($excel->sheets[0]['cells'][$x][$y]) ? $excel->sheets[0]['cells'][$x][$y] : '';if($excel->sheets[0]['cells'][$x][$y] == $excel->sheets[0]['cells'][$x][1] ){echo $cell;} else { echo $cell; }$y++;} $x++;} \[/code\]i used this code to get the values from excel to PHP, but if the excel has empty record the result will be modified something like extra cells. how can i fix this.
 
Top