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
2 answers

PhpSpreadsheet how to export html with sub headers?

ref: https://github.com/PHPOffice/PhpSpreadsheet/issues/1608 What is the expected behavior? Without Events What is the current behavior? What are the steps to reproduce? the issue is based on Maatwebsite/Laravel-Excel which internally use…
ctf0
  • 6,991
  • 5
  • 37
  • 46
3
votes
2 answers

How to get calculated value from cell formula in Maatwebsite Laravel Excel?

In excel, I have 3 columns named Total, Payment Released, and Payment Return. To calculate Payment Return, I added a formula inside it which is =U2-G2. Note: U2 is Payment Released and G2 is Total. I have read the documentation of Maatwebsite…
Dani Fadli
  • 353
  • 4
  • 18
3
votes
2 answers

Export process work but no file downloaded [ Maatwebsite / Laravel-Excel ]

PHP version: 7.3.9 Laravel version: 5.8.30 Package version: 3.1 Description I am trying to export excel file. I do all things in the documentation and the process work with no errors. but the excel file does not download.. I'm using Ubuntu…
Tharindu Prabodhana
  • 181
  • 1
  • 4
  • 16
3
votes
3 answers

laravel Excel Import set header on column

I have an import function from laravel excel, it worked but now I want to add a header on it and its not working, There's only 1 column in my excel sheet and the header is called Unit Type.
M.Izzat
  • 1,086
  • 4
  • 22
  • 50
3
votes
0 answers

Validate header rows different from database column names with Laravel Excel

I'm using the following package https://laravel-excel.com/ to import excel files but have run into a problem while validating the rows. The header row names might be different from the column names in the database. So my question is how can I…
SuperDJ
  • 7,488
  • 11
  • 40
  • 74
3
votes
1 answer

Laravel excel validate two columns' combination is not duplicate

I have a requirement wherein I need to ensure that Excel file being uploaded by user does not have duplicate rows w.r.t. 2 particular columns. Example: In the snippet below, I want to flag out that row 1 and 2 contain duplicate combination of…
Akshay Lokur
  • 6,680
  • 13
  • 43
  • 62
3
votes
0 answers

Edit existing excel file with laravel excel or php

I am working on a project where a user can upload an excel file with multiple sheets. Now I just need to append some rows in one of the sheets and download that file. I am using laravel excel version 3.0 for that. I tried to import the excel file…
Pankaj Agrawal
  • 1,469
  • 2
  • 17
  • 27
3
votes
2 answers

Laravel Excel 3.1 : Import, modify, download

I'm struggeling with Laravel-Excel 3.1. I'm not able to modify a file. My file has two sheets (called template). I want to load the document, modify it and let the user download it. The Excel file was not created by me, I just need to fill it with…
Ayoub TMT
  • 31
  • 4
3
votes
0 answers

How do I create multiline headers in Laravel Excel?

I am using Laravel Excel 3.1 to export data to Excel. My client wants to have multiple heading lines which include some metadata for the report such as report type and dates. Below is an example of what I'm looking for: Column A| Column B |…
3
votes
3 answers

Import CSV on Maatwebsite / Laravel Excel 3.1 using Excel::import

I've upgraded Maatwebsite/Laravel-Excel to 3.1 from 2.1. Some of the method are deprecated. Here is the code on version 2.1. $data = Excel::load($path, function($reader) {})->get()->toArray(); It's working when I used 2.1 but after I upgraded,…
shhrzl
  • 282
  • 1
  • 4
  • 15
3
votes
3 answers

How to update data in database using import excel

how to update data in database with import excel. i am using laravel 5.7 and maatwebsite 3.1 this is my controller : public function import() { $data = Excel::toArray(new ProdukImport, request()->file('file')); if ($data) { …
Rahmat Effendi
  • 337
  • 2
  • 11
  • 29
3
votes
1 answer

Set Active Sheet in Laravel-Excel 3.0

I've used previous versions of Laravel-Excel to export data and in the past I've been able to use $sheets->setActiveSheetIndex(0)->download('xls'); (link to PHPSpreadsheet documentation) to set the active tab when the user opens the file. In version…
Sue
  • 33
  • 1
  • 5
3
votes
3 answers

Laravel Excel is converting dates from heading into some numbers

I have a problem which is connected with Laravel Excel. I have heading filled with dates for example: 2018-05-23. But when I read it with excel extension by using: $data = Excel::load($request['file'], function($reader) {})->get(); The extension…
Martin
  • 1,259
  • 3
  • 17
  • 36
3
votes
2 answers

How to get real number while importing on Laravel Excel maatwebsite?

I'd like to get numbers as the real value while importing a file, e.g: When I open the csv, cell value: 198610012009011005 But when I import that using Laravel Excel, it'll be formatted to 1.98610012009011E+17 How can I get the real value of the…
Arie Pratama
  • 95
  • 2
  • 7
3
votes
1 answer

Export huge data into xlsx

I need to export a huge dataset from a MySQL database table with MYISAM engine into a .xlsx file in Laravel. I'm using the maatwebsite/laravel-excel package, which is based on PHPExcel. The datased consits of about 500,000 rows with 93 columns…
PeterInvincible
  • 2,230
  • 5
  • 34
  • 62