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
0
votes
0 answers

Connection closed prematurely

I have an application which gets the data from CSV as a collection and send to a SFTP path. I am using this flysystem-sftp and everything was working fine and suddenly started to get 'Connection closed prematurely' error for my job which send the…
0
votes
0 answers

Update join 2 table using import excel in laravel

i want to update 2 relation table, i have tried it but i got an error. i am using laravel 5.7 and Maatwebsite 3.1. This is my controller, i put excel data in $data: public function import(){ $data = Excel::toArray(new AssignmentFAImport,…
Rahmat Effendi
  • 337
  • 2
  • 11
  • 29
0
votes
1 answer

How to upload excel file in Laravel using laravelcollective?

I have a problem when import data xlsx using package fast excel. I wanna input excel files include the Id from different model like following below app/http/clustercontroller : public function Import($id) { $model = Cluster::findOrFail($id); …
tasyadas
  • 43
  • 6
0
votes
2 answers

How to set Number stored as text laravel excel?

this actual number 6471050909740010 and get replace by excel here the result 6.47105E+15 6471050909740000 This my code $collect = collect($model->toArray()); $excelData = Excel::create('Endorsement', function($excel) use ($collect) { …
Aslam H
  • 1,669
  • 4
  • 21
  • 46
0
votes
1 answer

Laravel excel not exporting in correct format

I currently have an array that I've built that dumps like this: 0 => array:11 [▼ "category_code" => "123" "category_name" => "Testing" "category_description" => "This is a test category" 19738 => array:5 [▼ "identifier" =>…
Geoff_S
  • 4,917
  • 7
  • 43
  • 133
0
votes
1 answer

Laravel Excel, problem with Memory exhausted when chunking data

I am using Laravel Excel package in my project. I have a problem that when I am importing the rows, the script stops during the process with message concerning the Memory usage limit. That is really strange, considering that I am processing the…
naneri
  • 3,771
  • 2
  • 29
  • 53
0
votes
2 answers

Laravel excel passing varable to exporter

I am working with Laravel Excel 3.1 trying to export file using two parameter web.php {route file} Route::post('/Download', 'Controller@Download'); and my controller public function Download(Request $request) { $StartDate = …
HelloWorld
  • 19
  • 1
  • 7
0
votes
1 answer

Laravel Maatwebsite Export to excel not working

I'm using Laravel 5.6 with Laravel-Maat Excel version 3.1. Even though i have referred official documentation but still Facing lot of problems while exports data to excel. Below is the link of that particular docs from git Click Here to view I'm…
Pavan Webbeez
  • 219
  • 3
  • 12
0
votes
1 answer

Laravel / Laravel-Excel missing forward slash in asset url

I am uploading excels in Laravel for processing with Laravel-Excel. I have the following issue: When I do this: $file = $request->file('file')->store('Questionnaires', ['disk' => 'public']); $file = asset($file); dd($file); I get something as…
forrestedw
  • 366
  • 3
  • 16
0
votes
1 answer

how to send hidden file to view of laravel (5.7)

I am creating an import function for import an excel file. the controller will handle it and save data to database.and after that,i want export the error to an excel file and send it to view. If the user clicks download, the excel file contains the…
The Manh Nguyen
  • 406
  • 6
  • 19
0
votes
1 answer

Laravel Excel handle error when file is open

I'm using Laravel Excel 2.1.0 in a local project to write a row into an excel file. This is my code: $filePath = storage_path('myfile.xls'); $rows = \Excel::load($filePath, function($reader) { $sheet = $reader->sheet(0); $sheet->appendRow( …
aletede91
  • 1,137
  • 2
  • 16
  • 30
0
votes
1 answer

Laravel-Excel returns required error with all rows

I am implementing Laravel-Excel into my project and could not figure out the validation. I try to upload the xlsx file with one row of data in it but still, the import throws required error. Following is my EventResultImport code namespace…
Mike Ross
  • 2,942
  • 5
  • 49
  • 101
0
votes
2 answers

Laravel-Excel 2, get the year and month from "date" in Carbon format

In Laravel-Excel 2, I'm reading a file like this: The code to read it is this: $my_file ='some/path/to/my_file.xls'; $data = Excel::selectSheetsByIndex(0)->load($my_file, function($reader) {})->get()->toArray(); This it the output for…
pmiranda
  • 7,602
  • 14
  • 72
  • 155
0
votes
2 answers

Maatwebsite/Laravel-Excel exports blank excel when using Input::get() in model

I developed a Laravel application that connects to a external MySQL database for reports. I'm using Maatwebsite/Laravel-Excel 3.1 to be able to export to excel. In this app, I have a method in my model that uses Input::get() for 3 variables ($from,…
0
votes
2 answers

How to call PHP property from string stored in a Variable

I'm using maatwebsite/excel package and I would like to dynamically pass different file type as a second parameter. See function here Below is the variable: $fileType = $request->input('fileType', 'xlsx'); $writerType = Excel::$fileType; But I get…