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

Data printed twice in first iteration

I'm using laravel blade. I try to print array of data as a column in a table. then, I put a conditional expression inside the loop to avoid printing the same value in the same column. After that my data printed twice in the first iteration.Here is…
0
votes
0 answers

Laravel-Excel export is empty after transforming collection

I have this code that is currently performing a successful export: $ncrforms = NCRForm::where('created_at', '>=', (new Carbon('first day of last month'))->toDateString()) ->where('created_at', '<=', (new Carbon('last day of…
James
  • 15,754
  • 12
  • 73
  • 91
0
votes
1 answer

Does Laravel-Excel has native method of PHP Excel?

I want to use Laravel-Excel, but my concern is which can I use native PHP-Excel method or not, as I have read the documentation. Laravel-Excel is run on of PHP-Excel.
jamal
  • 183
  • 1
  • 3
  • 15
0
votes
2 answers

Why is my Laravel Export returning a blank sheet?

I am using Laravel Export to export an excel file of some data. When I create my query, and use dd() to check what the data look like, everything looks good. For example: dd($result); array:510 [▼ 0 => array:24 [▼ "abc" => "123" …
Damon
  • 4,151
  • 13
  • 52
  • 108
0
votes
0 answers

Why am I getting File Does Not Exist error on App Engine when it's there in Storage, Using Laravel-Excel

Running PHP on App Engine, Laravel 5.1. The app is failing on \Excel::load($path); statement but afterwards when I look at the App Engine storage path the file is there. Here is the code: $file = $file->move($destPath,$filename); …
JohnL
  • 13,682
  • 4
  • 19
  • 23
0
votes
1 answer

Laravel-excel File not found

I have a photo which is located under this link: http://127.0.0.1:8000/photos/391987500/2.jpg I'm trying to include it in to excel file but I always have an error. I try this: it…
Dmitry Malys
  • 1,293
  • 4
  • 25
  • 46
0
votes
1 answer

Using Laravel Excel

I'm trying to use Laravel excel https://github.com/Maatwebsite/Laravel-Excel I have a simple question, how do I put the rows loaded in, into my database, and also how do I display them in a table in my view. The CSV file i'm loading only has one…
MGS
  • 456
  • 1
  • 9
  • 24
0
votes
1 answer

How to create drop down list using Laravel-Excel

I tried creating drop down list using laravel excel but after download dropdown list seems not to appear and doesnt even throw errors. Here is the code below: $excelsheet->sheet('ClassBoardData', function($sheet1) use($cc, $highrowofclass,…
0
votes
1 answer

Unable to download excel sheet from array using Laravel-Excel?

I have written code for exporting the data(which is from Query builder) and downloading that sheet immediately to user's browser. I am using Laravel-Excel package for this, but the csv file is not getting downloaded. I want the csv file to be 'Tab'…
Prasad Patel
  • 707
  • 3
  • 16
  • 53
0
votes
1 answer

Laravel Excel A1 Error

I am using Laravel Excel here is the version from composer "maatwebsite/excel": "~2.1.0" I am trying to pull data out of an excel document that only has cell A1 with data in it. When I try to var_dump the data coming from excel I get the title of…
user908759
  • 1,355
  • 8
  • 26
  • 48
0
votes
3 answers

Why Laravel-Excel reads first row as column name

I need to read an .xls file and put it into an array. I'm using laravel-excel package for reading excel files. I have a Excel file like this : I need to have an array like this : [ '9921234567' => 'First Text', '9929876544' => 'Second Text', …
Hamed Kamrava
  • 12,359
  • 34
  • 87
  • 125
0
votes
1 answer

Select columns in different variables Laravel Excel

I use Laravel Excel and I want to load columns separately, like this: $rows = Excel::selectSheetsByIndex(0)->load($fileName); $a = $rows->select($column1)->get(); $b = $rows->select($column2)->get(); Where $column1 and column2 are array with the…
K4tn1x
  • 133
  • 3
  • 14
0
votes
0 answers

Laravel Excel time out when create csv file

I am trying to create a csv file with 100 000 records in ,but it is timing out. If i run 10 000 records it works fine. $users1 = Aapplicant::select(DB::raw('applicant.AppID as Application_ID, tapplicant.Email, …
Jack
  • 21
  • 4
0
votes
2 answers

Access variable outside of Excel::load in Laravel

I would like to ask if how can I access the error message variable when I execute the a foreach loop inside the Excel::load function which reads the csv file that I uploaded so that I can return it via the Response::json(); Here's my…
Sydney Loteria
  • 10,171
  • 19
  • 59
  • 73
0
votes
2 answers

Is there a built-in way to convert a column number to an Excel column with Laravel Excel

I want to add some style on a column using Laravel Excel. I know this column is the (let's say) 42nd, but I don't know the Excel code (like AA, BC, etc.). I know I can build a function (based on this answer) to convert the column number to a…
rap-2-h
  • 30,204
  • 37
  • 167
  • 263