Reputation: 285
I use Laravel Excel and I have data at ''A3'' cell. How to get it? I take this code is not working. It's show all data in that sheet. Reference
$sheet = $doc->getSheetByName('data');
$sheet->getCell('A3');
Upvotes: 0
Views: 1150
Reputation: 397
I'm using it too.You can check the array by dd, and get needed cell.
public function loadExcel(Request $request)
{
$path = $request->file('file')->getRealPath();
$records = \Excel::load($path, function ($reader) {
$reader->noHeading();
})->get()[0]->toArray();
dd($records);
//When you find the index of needed cell just $needed_cell = $records['index'];
}
Upvotes: 1