Hi guys! I'm currently trying to implement something like this but with laravel- Excel:
Excel::load($filename, function($reader){
$reader->each(function($sheet){
$var = $sheet->val;
if ($var == null) {
$var = "Im an empty value";
}
echo $var . '<br/>';
});
});
Is their a way to implement prev() here?
Thanks in advance!
Found it! This is what I ended up doing.
$results = Excel::load($filename)->get();
$var = 0;
foreach($results as $rows)
{
$rowYouNeed = $row->field;
if($rowYouNeed != null){
$var = $row->field;
}else{
$rowYouNeed = $var;
}
}
Hope this saves someone a headache.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community