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

Copying excel column and inserting into new array

Problem: What I am trying to achieve is to copy a selected range of cells from one excel spreadsheet and insert it into a newly generated one using laravel-excel and phpspreadsheet libraries. So far, the code that I've got, sort of does that but not…
Ed T.
  • 325
  • 2
  • 12
0
votes
1 answer

Laravel-Excel 3.0 How to style excel table with view

I have read https://laravel-excel.maatwebsite.nl/3.0/exports/from-view.html but none from this explain how to styling table. public function print(Request $request) { $this->validate($request, [ 'start_date' =>…
Othsout
  • 113
  • 3
  • 15
0
votes
0 answers

Creating an array with 2 same values as keys

I'm reading an excel, and in the headers there are 2 equal values, for example "HELLO" and "HELLO", but when I create an array or object from those headers, using those values as key of each value, they are overwritten since They have the same…
pmiranda
  • 7,602
  • 14
  • 72
  • 155
0
votes
4 answers

How can I set text align right in the column on the laravel Excel maatwebsite?

I get reference from here : https://laravel-excel.maatwebsite.nl/3.0/getting-started/ I have been looking for how to set the text align right, but I did not find it in the documentation My script export like this :
moses toh
  • 12,344
  • 71
  • 243
  • 443
0
votes
1 answer

How can I custom number format in laravel excel maatwebsite?

I read in this tutorial : https://laravel-excel.maatwebsite.nl/3.0/exports/column-formatting.html My script export like this : namespace App\Exports; ... use PhpOffice\PhpSpreadsheet\Style\NumberFormat; use…
moses toh
  • 12,344
  • 71
  • 243
  • 443
0
votes
1 answer

cyber-duck/laravel-excel file corrupt / invalid format

I've spent hours finding out why the excel export with the package cyber-duck/laravel-excel export OK the excel when the datasource is a query, but when using a custom serialiser it simply stops formatting the excel correctly No errors in code,…
leopinzon
  • 707
  • 6
  • 13
0
votes
2 answers

Exporting Excel getting this error Trying to get property 'id' of non-object

I'm using Maatwebsite Laravel Excel package 3.0. This is my InvoicesExport.php class InvoicesExport implements FromCollection { public function collection() { $company_id = Auth::user()->company_id; $assets =…
Nemanja
  • 119
  • 1
  • 3
  • 16
0
votes
1 answer

I can not upload file

i want to import and export a excel file and these are my codes: This is CustomerController; public function customersImport(Request $request) { if($request->hasFile('customers')) { $path = $request->file('customers')->getRealPath(); …
Cugurel
  • 107
  • 1
  • 3
  • 9
0
votes
1 answer

Laravel custom CSV exporting

I would like to know is it possible for me to edit columns before exporting my CSV file or not? For example I have products table where has title description created_at updated_at what I want is to export something like title body as you see here i…
mafortis
  • 6,750
  • 23
  • 130
  • 288
0
votes
0 answers

Out of memory when uploading excel file in laravel

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…
user7747472
  • 1,874
  • 6
  • 36
  • 80
0
votes
1 answer

Laravel PHPExcel - No access to certain methods

I am trying to use an excel template file in Laravel to create new files. I seem to not be able to call certain methods and get errors like: PHP Error: Call to undefined method PHPExcel_Worksheet::cells() I can populate cells with data, but don't…
Andy P.
  • 29
  • 5
0
votes
0 answers

Some issues with Laravel Excel

I'm trying to parse .xlsx file through Laravel Excel library. Library I've made this code in my Controller just for check. $file = $this->argument('filepath'); $excelCollectionExcel = Excel::load($file, function($reader) { …
Rosti
  • 161
  • 1
  • 15
0
votes
2 answers

Laravel excel import undefined index

When I'm trying to import xlsx file I have error: { "message": "Undefined index: $", "status_code": 500 } but if I save this file to csv and try to import all work like a charm. What is wrong with xslx format?
rostyslav
  • 49
  • 1
  • 7
0
votes
1 answer

Laravel file upload timing out - adding chunk to updateOrCreate?

I'm trying to upload a users csv file and pass the data into a database but because the size of the csv / rows, it keeps timing out. The data must be checked to see if it's already in the database and update or create. I have applied a chunk to the…
CIB
  • 535
  • 1
  • 12
  • 35
0
votes
1 answer

LaravelExcel: Evaluate Calculation when export to CSV

I am using Laravel Excel: http://www.maatwebsite.nl/laravel-excel/docs for Laravel 5+ I am trying to convert an XLSX file to a CSV file. This is working fine, except that in the resulting CSV file the calculations are not evaluated, and are returned…
Andries Heylen
  • 363
  • 1
  • 2
  • 12