I am trying to upload excel sheet in laravel with the help of laravel excel
package. The problem i am facing is that, even after following their instructions when i try to upload my excel sheet it keeps loading and loading. On the laravel log file it says that
local.ERROR: Out of memory (allocated 1598029824) (tried to allocate 469762048 bytes) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1)
The file size is only 70kb
and on my php.ini
i have allocated 8gb
memory
The code that i am using to read the excel file is below
if($request->hasFile('excelSheet')){
$path= $request->file('excelSheet')->getRealPath();
$data = \Excel::selectSheetsByIndex(0)->load($path)->get();
echo'<pre>';
print_r($data);
}
The excel sheet that i am trying to upload has multiple sheet, a screenshot of which is been attached with the question.
Can anyone please tell me how i can get these data or how can i fix memory allocation problem ?