Questions tagged [laravel-excel]
Import and export Excel and CSV files in Laravel (based on PhpExcel)
396
questions
0
votes
0answers
8 views
laravel-excel can't Use Dependency Injection laravel 8
I want to Use Dependency Injection laravel-excel in laravel 8 but I got error
this my code in ShipmentsExport:
namespace App\Exports;
use App\Shipments;
use Maatwebsite\Excel\Concerns\FromCollection;
...
-1
votes
0answers
12 views
Text Rotation not working when convering from Excel to PDF
When working On Laravel 8 I need to provide Export to Excel and PDF options
For Excel-writer I am using Laravel-Excel package it creates perfect Excel file as needed. Here some Cell have Vertical Text ...
1
vote
2answers
35 views
Laravel queued job success notification
I am curious how can I know when a queued job completed successfully to potentially notify the relevant user, if they choose to receive notifications.
Specifically I am working with a Laravel Excel ...
0
votes
0answers
42 views
Not showing mesage when validating excel file in laravel import
I am using excel 3.1 in Laravel for importing excel files. I have included a validation for the name field. So whenever the name field is duplicating it will not import that row data to DB. everything ...
0
votes
3answers
32 views
Image not found on <img src={{ asset(…) }}
This is my blade Looks like :
<img src="{{ asset('/assets/img/logo.png') }}" alt="logo" width="60px" height="60px">
And here's my folder structure
When ...
-1
votes
0answers
18 views
ErrorException Undefined offset: 1 import EXCEL laravel
I am trying to do an import from my excel file, which I then save as a .csv file
Then I try to import, but it shows me an error:
ErrorException Undefined offset: 1
this is my model:
<?php
...
-1
votes
0answers
62 views
Laravel PHP keep getting Undefined array key when it actually exists
I am trying to use Laravel Excel and I am reading the excel file row by row using OnEachRow, and in onRow() function, I am changing the row instance to an array. What's really bothering me that I keep ...
0
votes
1answer
36 views
Laravel excel importing csv configs for this csv data structure?
I'm trying to import csv file using Laravel-excel composer package, but that csv file inside deferent that usual csv files,
then I found by changing config of default Laravel-excel package can make it ...
0
votes
0answers
30 views
Laravel import excel with progress bar html
My Project use maatwebsite/excel to export/import excel. I want to display progress bar or show percent complete value. How to insert that and update it continuously when i export/import.
This is what ...
1
vote
1answer
96 views
Is there a way to freeze the first row of the excel with Laravel Excel 3.1?
I´m using maatwebsite/excel 3.1 in Laravel 5.8 project.
I need to set the first row fixed when exporting the excel. What was known in version 2.1 as Freeze rows.
Excel::create('Filename', function($...
0
votes
0answers
28 views
How do I export using Laravel-Excel so that it produces SUBTOTAL output?
I want export from LARAVEL EXCEL to produce SUBTOTALS from column "Total Biaya/ Total Cost" (jur_totalbiaya in MySQL) based on Sort from column "Kode Sumberdaya/ Resource Code" (...
0
votes
0answers
15 views
Laravel Excel - multiple sheets with custom view
I have been trying to export a multi sheet .xlsx spreadsheet using a custom view without any luck - the sheet ends up blank.
TransactionsExport.php
<?php
namespace App\Exports;
use App\Exports\...
0
votes
0answers
39 views
Laravel Validate Required_if of an array in maatwebsite/excel
I am having an array field status and if value 0 exists then I need to validate another field expert.
public function rules(): array
{
return [
'status' => 'required|array|...
0
votes
0answers
20 views
incorrect table name inserting into using Laravel Excel to Collection
I'm attemptng to insert relational data using the Laravel Excel concern ToCollection
use Maatwebsite\Excel\Concerns\ToCollection;
however the query is attempting to insert into the table ...
0
votes
0answers
24 views
how do i map excel file column in laravel to store selected excel file column data in specific filed in mysql
as you can see in the image :
user will select an excel file
1st 10 rows with heading will be shown to the user
from the dropdown button user can select, in which MySQL column the specific excel ...
0
votes
0answers
65 views
Export images with Laravel-Excel
my Code Here is Exporting Images For Products Table but it exported in this format https://prnt.sc/109zsm6 i think image not setting for column value or not overriding
in column there is image and ...
0
votes
0answers
32 views
Guzzle Http with Maatwebsite Excel Response Content Type
I am using Postman for the excel export API testing. I have the response data as shown in the picture below.
After I press "Save Response to a file", it's giving me a html file (response....
0
votes
1answer
109 views
Setting up Laravel-excel and PhpSpreadsheet macro
I am using Maatwebsite Laravel-excel version 3.1. And I want to set the default styling of the sheet. I have read the documentation about including a macro in your laravel app by setting this in my ...
0
votes
0answers
97 views
Malformed UTF-8 characters, possibly incorrectly encoded with Guzzle/Http
I have an API created for export records in xlsx. It is working fine when I call the API directly but if I am using Guzzle/Http to call the API and this was tested using Postman, I get the following ...
0
votes
0answers
15 views
Export Laravel Excel Data horizontally
I'm using rap2hpoutre/fast-excel library for exporting the information I need. Currently, with basic settings, I receive my data in the excel document in the following format:
Questions
First Question
...
0
votes
2answers
29 views
How to descend rows in laravel excel is like pressing control enter
In the code how can I give a new line down. I want to have days on a row and have to load every day.
0
votes
0answers
27 views
Inserting additional data in import using Laravel-Excel
Good afternoon everyone, I need to make an insert in 2 tables: "serialziacions" and "det_serializacions" for what in my controller I have a function that through a transaction will ...
0
votes
2answers
176 views
AWS SQS Exception “413 Request Entity Too Large”
I have been stuck for a while to figure out about the below exception any help would be apricated.
we are using AWS Lambda service on a Laravel project. and we are exporting a large number of data to ...
0
votes
1answer
53 views
Maats Laraval Excel: Can you export with multiple queries?
I have gone through the docs and also Googled. I see little mention of returning multiple queries on the same sheet from Maat's Laravel Excel. I presume therefore it is 1 query for 1 downloaded ...
0
votes
1answer
28 views
How to download Laravel Excel with Ajax method
I'm working on Laravel Excel using Ajax method. Below is my controller.
public function downloadExcel(){
return Excel::download(new SomeExport(), 'project.xlsx');
}
And this is ajax call.
$(...
0
votes
1answer
36 views
Count record of Excel sheet before upload
I am working on Upload excel sheet. I need to count records of the excel sheet before upload to use as condition. I am using this package. My code is like below.
public function import()
{
...
0
votes
0answers
20 views
Laravel excel cropping long value column
I am using Laravel excel with TCPDF to export data to PDF.
I have a column that has long values and its cropping the data.
Is there a way I can wrap text and make the data visible?
I have tried few ...
0
votes
0answers
53 views
Exporting file using API Axios
I am trying to export excel file using Laravel-excel package Maatwebsite and download it from my front-end using Vue and Axios.
Everything works perfect but problem is that I am generating the file ...
0
votes
1answer
79 views
Laravel Vapor and Lavavel Excel queued imports failing. due to temp storage not existing Laravel 8 Vapor
When I am trying to run an import that implements chunk reading and queues I am receiving the following error from the vapor queue;
ErrorException: touch(): Unable to create file /tmp/storage/...
0
votes
1answer
52 views
Laravel Array based date validation after_or_equal multiple dates?
I am importing excel file to collections using laravel-excel package. I am trying to validate the date field reporting_date such that it is after_or_equal two other date fields registered_date and ...
0
votes
1answer
92 views
PhpSpreadsheet \ Reader \ Exception Failed to load /root_dir/public/laravel-excel-fLRGTlw9uEE2XRz0k1fXdcg2wfs2RWy7.html as a DOM Document
I have tried everything for resolving this issue but nothing worked.
php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan config:clear
Also Updated my Dependencies
...
0
votes
1answer
104 views
How can I set encoding for export csv with Laravel Excel in Laravel
I using Laravel Excel for export CSV file in Laravel.
How can I set the encoding for export csv file.
I have tried several ways:
Change config in excel.php
'use_bom' => false,
Use ...
1
vote
1answer
31 views
Laravel Excel 3.1 styling without model
I am using laravel-excel.com in my Laravel project.
Since data is not coming from a specific model, I didn't want to create a dummy model class and I generate the excel file directly:
return (new \...
0
votes
1answer
45 views
Laravel Excel : error Resource interpreted as Document but transferred with MIME
Laravel Excel to export data will download empty data with only headers in excel sheet! I want to export only the filtered data from my search using excel but it will download an empty excel sheet ...
0
votes
0answers
53 views
Laravel excel exporting images with special characters file name
What I am trying to do:
I am trying to export Excel containing images using Laravel-excel. I am using Blade View to export the data.
Export Controller Code:
public function view(): View
{
if ($...
0
votes
0answers
31 views
How to solve Laravel Excel sheets issue?
Where can I find this onlySheets Method ?
I wanna import data from Excel file that contains sheet called "Clients".
I've created a ClientsImport.php file :
<?php
namespace App\Imports;
...
1
vote
0answers
36 views
How to import excel file into two tables with input tags at the same time?
I have two table one is users and the next one is students, the students table store the data of users based on their role. and the relation between user and student is user_id in students table.
And ...
0
votes
1answer
28 views
How to export only today's records in Laravel Excel
i want to export only today's record from my table not whole data, i used Carbon also it didnt work and it just simply export empty excel file. here i am sharing my code snap please help me.
i am ...
1
vote
0answers
45 views
use Laravel Excel inside laravel package development
I'm creating my own Laravel package for the first time. I create a new project and require orchestra/testbench in the project. Things look okay and I'm able to run tests inside the package but I ...
0
votes
0answers
30 views
How to specify excel rows quantity for import
I'm using maatwebsite/excel 3.1,when importing excel file with 5 rows and 34 columns of data, it takes 500 rows and each row contains 703 columns and I need to decrease memory usage.
How to specify ...
0
votes
2answers
38 views
Formatting Excel Laravel with array data
I'm trying to write an excel from a laravel controller where i have all the data in an array, and i managed to write it, but i have to format it now, this is the array that i have:
[2020-12-30 13:22:...
0
votes
0answers
7 views
Matwebexcel getRowCount returns 0
I tried the following code following document:
https://docs.laravel-excel.com/3.1/architecture/objects.html#getters
class CategoryImport implements ToModel, WithHeadingRow, WithMultipleSheets
...
1
vote
0answers
33 views
Cannot use object of type App\Exports\OffetTableExport as array - Laravel Excel
I am working on multiple sheets on laravel excel. And, I am exporting data on two sheets using two export. But, half of the data to pushed on 2nd sheets will be generated in 1st export. So I am having ...
0
votes
1answer
48 views
No query results for model [App\User] NULL 387 /laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
I know a similar question has been asked but the reasons for those error does not imply in my case because I am not fetching results anywhere in code.
I am not using the 'find' or 'findOrFail' method ...
0
votes
1answer
876 views
Laravel Excel Style with CSS not working while exporting view
I am trying to export view using laravel Excel 3.1. While the export is working, I am not being able to style it.
My laravel Export looks as:
<?php
namespace App\Exports;
use Illuminate\Contracts\...
0
votes
1answer
30 views
Place a column at the end of a collection in laravel excel
I have an excel file that has a query to get the neighborhoods, and the total record for each neighborhood. But how can I put at the end, when all the data of the query is placed in the excel a custom ...
1
vote
0answers
32 views
Excel validation in Laravel
I'm trying to do some Excel validation when uploading a file. This is what my Excel file looks like.
Name | Price 1 | Price 2 | Price 3 | Total
Item 1 | 123 | 123 | 123 | 369
Item 2 | ...
0
votes
0answers
63 views
Laravel Excel to PDF download
I am using Laravel Excel to generated pdf invoice.
Below code is from controller to download the pdf. I have created a Export file InvoicesExport.it is downloading but styles are not applied.I have ...
0
votes
1answer
179 views
laravel-excel 3.1 with laravel framework 6.2 and php 7.4
I have problem with laravel-excel 3.1 after i have been upgrade laravel version and php version i got some requirement from laravel to upgrade laravel-excel too. after that i got problem with excel-...
0
votes
0answers
43 views
import an excel file into database Laravel
I am having an issue with import excel file into database. I want to upload column name into the database.
Everything is working fine, but the values inserted is "r" rather than being the ...