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
3
votes
1 answer

Laravel Excel chart

i'm trying to create a chart with the Laravel-excel package , but when the file is created and exported is without chart. I'm using laravel 5.1. The excel.php file has the property 'includeCharts' => true public function getChart(){ …
Douglas
  • 31
  • 1
  • 4
3
votes
1 answer

Scope - How to return errors from laravel excel import?

I'm using Maatwebsite/Laravel-Excel for importing some data into my laravel app. I'm looping trought the rows of the excel, validating the data and then save it, but if I got a validation error I want to return the $error variable from outside the…
Agu V
  • 2,091
  • 4
  • 25
  • 40
3
votes
0 answers

Laravel Excel returns blank value with Sumproduct Excel Formula

I am creating two sheets one having data and another sheet shows some calculations based on the first sheet but the sumproduct() formula doesnt work properly while creating sheet. The same formula works directly on the sheet. Also the phpexcel…
Akash Shah
  • 53
  • 7
3
votes
0 answers

Maatwebsite/Laravel-Excel: How to select sheets other than first sheet using selectSheetsByIndex?

Excel::selectSheets('GalleryPhotos')->load($path)->get(); causes an exception when the sheet "GalleryPhotos" has no rows. So, the alternative is to use selectSheetsByIndex instead of selectSheets. For…
Debiprasad
  • 5,895
  • 16
  • 67
  • 95
3
votes
1 answer

Testing Laravel-Excel download

I'm using following package: https://github.com/Maatwebsite/Laravel-Excel at version 2 with Laravel version 5.1 I've have got controller method with following code: .... return Excel::create('List', function($excel) use ($list) { …
Azamat
  • 435
  • 5
  • 13
3
votes
2 answers

Laravel Excel Download using Controller

So I created a PHP Controller to handle exporting data which is posted by JS. The problem is I can see it creates something in the console but the file download never starts. I tried using ->store (laravel excel) and keeping it in an export folder…
Nick
  • 307
  • 1
  • 4
  • 16
3
votes
2 answers

Laravel-Excel massive import

So, I have an excel file with 28k rows. I want to load it, then insert into database, but it was just stopped. (blank space) I've tried to reduce into 5k data, and it worked, but is too slow I also tried using chunk, with only 5k data, but I got…
Irfandi D. Vendy
  • 894
  • 12
  • 20
3
votes
4 answers

How to pre-format a cell to date on Laravel Excel

I am using the package maatwebsite.com/excel for exporting xls files from my app. I want to pre-format the cell to date. Is it possible? I have formatted the data to date, but I want that the cell would be pre-formatted with date (its default cell…
Jay Marz
  • 1,861
  • 10
  • 34
  • 54
3
votes
1 answer

Laravel-Excel CSV delimiter not working

I'm having the same problem. Using Laravel 4. Here's the code from my controller: public function uploadData() { $file = Input::file('data')->getRealPath(); \Excel::load($file, function($reader) { echo "
";
     …
flyingL123
  • 7,686
  • 11
  • 66
  • 135
3
votes
2 answers

how to delete empty rows in laravel excel?

So i work with Laravel, and i use Laravel excel to load excel/csv files, but my files contains empty rows and i want to delete every empty row. this is my code : Excel::selectSheetsByIndex(0)->load($path, function($reader){ $results =…
Mohammed Hassar
  • 483
  • 1
  • 5
  • 13
2
votes
0 answers

How to remove row gap between two tables in Laravel maatwebsite/excel FromView

I want to export order and order item data in my laravel web app in xls format so i decided to try using maatwebsite/excel v3.1. I'm using FromView class to convert blade template into an excel file, the blade structure looks like this: …
jojo
  • 126
  • 11
2
votes
1 answer

How to remove double quotations from exported csv file

I'm using Laravel 5.8 and I have added Maatwebsite package for exporting CSV files from a database table. And here is my exported class: class ConfirmedExport implements FromCollection, WithHeadings { public function headings():array{ …
Pouya
  • 114
  • 1
  • 8
  • 36
2
votes
1 answer

Import data with maatwebsite laravel excel in Laravel 8

This is the first time that I tried to work with the Maatwebsite/Laravel-Excel package using Laravel 8. I'm trying to import data from excel file to database table. My table: But I have some difficulties or questions: In my database table I have a…
saadia
  • 79
  • 9
2
votes
3 answers

Split grouped data at import

I have an excel spreadsheet like the following: That results in nine models with that attributes: Group Column Value I tried to find a solution using Laravel Excel but I'm stuck. The problem is that one row becomes three rows and I don't know how…
shaedrich
  • 5,457
  • 3
  • 26
  • 42
2
votes
2 answers

Laravel excel maatwebsite import, date column in excel cell returns as unknown format number. How to solve this?

how to solve date format? Error: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '43112' My import class public function model(array $row) { return new Agreement([ 'code' => $row[0], 'start_date' =>…