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

Problem in reading file from server using laravel excel

I am trying to read an excel file from server. I want to get the data and turn it into an array. Earlier I tried converting excel into an array and I succeeded. I used the following code. $data = Excel::toArray(new Import, request('file') ,…
Nabil Farhan
  • 1,444
  • 3
  • 25
  • 41
0
votes
0 answers

Laravel excel export headings() throw exception only in queue

I am trying to export large data using Laravel Excel Queued. It works fine if i remove the headings method from the export class. If i try to include headings method it give me an exception. FatalThrowableError: Return value of…
Ahmad Elkenany
  • 575
  • 5
  • 23
0
votes
0 answers

How to handle time consuming tasks in stack Laravel + Forge + DigitalOcean?

I have an app, that using maatwebsite/laravel-excel lib, imports excel file with employees data. On each imported row app creates a new user. After that, it fetches all created users and sends to them an email with temp…
Virtual Device
  • 1,650
  • 3
  • 10
  • 26
0
votes
1 answer

Convert string to date laravel excel

Hi I have a problem for date time format when I set a string to date like this $row['waktu_awal'] = date('Y-m-d H:i:s', strtotime($discharge->waktu_awal)); Format text/string change to date but in excel format not change to date like this…
Temmy Alex
  • 43
  • 1
  • 9
0
votes
1 answer

Laravel import and str_replace

I would like to know how could I use str_replace in this function... I tried like this.. but didn't work, can somebody help me? public function onRow(Row $row) { $row = $row->toArray(); $incidencias = Incidencias::firstOrCreate([ …
Oscar
  • 139
  • 1
  • 13
0
votes
1 answer

How to avoid special characters with Laravel Excel?

I'm trying to upload an excel file... but my string contains this special character "°" how could avoid it to upload into my database? use Maatwebsite\Excel\Concerns\WithHeadingRow; class IncidenciasImport implements OnEachRow, WithHeadingRow { …
Oscar
  • 139
  • 1
  • 13
0
votes
0 answers

Laravel Excel queued export failing

I have been having a lot of trouble getting the Laravel Excel package to export a large amount of data. I need to export about 80-100k rows so I implemented the queued export as mentioned in the docs. It works fine when I export a smaller amount…
Sehael
  • 3,678
  • 21
  • 35
0
votes
1 answer

How to add password to Excel file in Laravel

I am learning Laravel Framework. I like to know if there is a package or tool that automatically adds or insert password into Excel file in Laravel application so that registered user can open the file with password known to the user only after…
Bless Joe
  • 1
  • 1
  • 2
0
votes
1 answer

where to put the excel file to use it in Laravel Excel 3

I would like to use one excel file with Laravel excel and i'm wondering what's the best location to put this file ?
Mostafa Abdellaoui
  • 355
  • 1
  • 6
  • 15
0
votes
0 answers

Passing received `.xlsx` file from Laravel application to Nextjs front end ui

I made a request from Nextjs front end ui to Nextjs api and this api send another request to Laravel application to generate an Excel file and return the Excel file to Nextjs api. And finally serve the Excel to the ui as attachment. So far my code…
Muhaimin CS
  • 195
  • 2
  • 19
0
votes
0 answers

Preserve styling when importing xlsx file

I am using laravel-excel package to import a xlsx file into my database. I have followed their guide and everything is working fine except i lose all styling from the cells. For example i have in the cell: The quick brown fox jumps over the lazy…
Shile
  • 1,063
  • 3
  • 13
  • 30
0
votes
0 answers

dysplay data to database from excel file

I'm trying to export the data from the database to excel with laravel 5.0. To achieve this I use a stored procedure to get data. BEGIN SET SESSION group_concat_max_len = (3*1024); SET @SQL = NULL; SELECT GROUP_CONCAT(DISTINCT…
0
votes
1 answer

Laravel Excel: Export variant headers

I am facing the following challenge with Laravel Excel, which I consider to be the best spreadsheet out there. So, let's each row is a user and would like to generate the headings for their hobbies as such: name, hobby_1, hobby_2, hobby_3 Jim…
thitami
  • 828
  • 2
  • 21
  • 44
0
votes
0 answers

Laravel Excel with Microsoft Excel Macro Buttons

I Use Laravel php Framework and laravel-excel plugin For edit pre created Microsoft Macro Excel file.this process worked charm but after edit existing macro sheet buttons not display.how to solve my problem? I attached My Requirement and Result as…
0
votes
2 answers

import csv data with user details who uploading laravel-Excel

Here is my Import function public function csv_import(Request $request){ if (! Gate::allows('add')) { return abort(401); } // Increase Execution time ini_set('max_execution_time', 1200); request()->validate([ …
itxrahulsingh
  • 53
  • 1
  • 11