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


i in middle of development. want eliminate empty rows while upload excel php using php excel plugin.

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++; }  

i used code values excel php, if excel has empty record result modified cells. how can fix this.

if (!array_reduce(     $excel->sheets[0]['cells'][$x],     function ($state, $value) {         return $state && !($value > '');     },     true )) { // execute while($y<=$excel->sheets[0]['numcols']) loop here } 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -