Questions tagged [laravel-excel]

Import and export Excel and CSV files in Laravel (based on PhpSpreadsheet)

Import and export Excel and CSV files using Laravel code. Supported formats: XLSX, CSV, TSV, ODS, XLS, HTML.

Reference

563 questions
4
votes
3 answers

Error in laravel excel export - touch(): Unable to create file /var/folders/ because Permission denied

I install larvel excel and when i try to get the excel it shows the following error touch(): Unable to create file /var/folders/wg/vbj_bbf14gl7glz__j1xpvg40000gn/T/laravel-excel-62n8RpljR3nr31FGxE96fwrovKEhXPWT because Permission denied
Heshanmax
  • 95
  • 1
  • 8
4
votes
3 answers

Laravel Excel 3.1 export large data

I need to export over 100K records to Excel from database using Maatwebsite Laravel excel 3.1 plugin, the problem is that I get data as an array. $data = $this->client->getData("sc/asistencia-social/informe",$request->all()); return (new…
Rodrigo Cabrera
  • 81
  • 2
  • 10
4
votes
3 answers

How to increase maximum execution time in laravel?

I want to upload large excel file. But because the file contains many rows, the loading is so slow and I got this error: FatalErrorException in Controller.php line 457: Maximum execution time of 120 seconds exceeded I already put this on my…
Nadeshiko Rin
  • 87
  • 1
  • 2
  • 13
4
votes
3 answers

Maatwebsite Excel load function not working

$file = $request->file('excel'); $reader = Excel::load($file->getRealPath())->get(); The following error appears: Call to undefined method Maatwebsite\Excel\Facades\Excel::load() I am using Maatwebsite 3 in laravel 5.7
4
votes
3 answers

Laravel excel Class 'ZipArchive' not found

I have laravel project with ability to upload data to mysql from .csv file using laravel-excel plugin. When I try to upload data to mysql from .csv file, I get error "Class 'ZipArchive' not found". Can't understand what 'zip' has to do with it, if I…
LinasM
  • 105
  • 1
  • 1
  • 7
4
votes
3 answers

Laravel Excel: how to get value of a cell?

I've loaded .xls file with Laravel Excel: Excel::load('public/files/20160621.xls', function($reader) { // read a cell value }); How do I read values of cells of the loaded excel file? Documentation seems to be unclear on that part.
qwaz
  • 1,285
  • 4
  • 23
  • 47
4
votes
2 answers

Laravel Excel Export set value to cell?

I have used maatwebsite excel library for Import and Exporting data. i want to set cell wise data like. A B C D E F 1 heading1 heading2 heading3 heading4 heading5 heading6 2 data1 …
Renish Khunt
  • 5,620
  • 18
  • 55
  • 92
4
votes
1 answer

Getting Laravel Excel chunk results outside callback

I have a problem with getting results of Laravel Excel chunk method outside callback. I tried to solve this problem by passing variable to callback by use keyword. Guided by documentation I tried: $foo = [[1, 2], [3,…
M Biniek
  • 63
  • 8
4
votes
1 answer

Selecting a sheet using Laravel-Excel

I'm using the very useful https://github.com/Maatwebsite/Laravel-Excel package. As I liked the idea of keeping my controllers clear of the excel import code, I'm loading the uploaded file using ExcelFile injections, see here:…
haakym
  • 12,050
  • 12
  • 70
  • 98
4
votes
4 answers

Laravel Excel/PHP Excel: Import, modify, download

I'm struggeling with Laravel-Excel (Laravel Package of PHPExcel). I'm not able to modify a file. My file has one workbook (called template). I want to load the document, modify it and let the user download it: Excel::selectSheets('template') ->…
LuMa
  • 1,673
  • 3
  • 19
  • 41
3
votes
1 answer

Laravel Excel is not working when queuing

I have the following laravel excel export: namespace App\Admin\Exports\Items; use App\Flare\Models\Item; use Illuminate\Contracts\Queue\ShouldQueue; use Maatwebsite\Excel\Concerns\Exportable; use Maatwebsite\Excel\Concerns\FromQuery; class…
TheWebs
  • 12,470
  • 30
  • 107
  • 211
3
votes
1 answer

Is there a way to freeze the first row of the excel with Laravel Excel 3.1?

I´m using maatwebsite/excel 3.1 in Laravel 5.8 project. I need to set the first row fixed when exporting the excel. What was known in version 2.1 as Freeze rows. Excel::create('Filename', function($excel) { $excel->sheet('Sheetname',…
Esternome
  • 33
  • 2
  • 7
3
votes
0 answers

Excel validation in Laravel

I'm trying to do some Excel validation when uploading a file. This is what my Excel file looks like. Name | Price 1 | Price 2 | Price 3 | Total Item 1 | 123 | 123 | 123 | 369 Item 2 | 1200 | 300 | 900 | 2400 I need to make…
3
votes
1 answer

How to insert Custom row Laravel excel collection

I trying to export a Excel file, from a collection using laravel. The code bellow, returns me this. I need to add a 2 new rows above the start of columsn, is that possible? What Should I do?
Vitor Albres
  • 113
  • 3
  • 9
3
votes
1 answer

How to set a row height in a export from Laravel Excel?

It's possible to auto size the columns but is there a way set the row size automaticaly? I've searched for it in the oficial docs and didn't found anything for the 3.1 version. I've also tried the issue on the project's GitHub page, but they…
Esron Silva
  • 65
  • 1
  • 8
1 2
3
37 38