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

Is it possible to add a border to an entire column with Laravel Excel?

With Laravel Excel, it's easy to add a border to a cell: $sheet->cell('A1', function($cell) { $cell->setBorder('none', 'none', 'thin', 'none') }); It's easy to add a border to a row too: $sheet->row(3, function($row) { …
rap-2-h
  • 30,204
  • 37
  • 167
  • 263
0
votes
2 answers

Unable to access variable data in Laravel controller function

I am using the Laravel Excel project to export data to an Excel file. I am able to generate a file with the correct data using hard coded month and year values, like so public function month() { Excel::create('New file', function($excel) { …
terrorfall
  • 1,121
  • 3
  • 16
  • 33
0
votes
1 answer

laravel excel, is there a better way than a thorough mime type check to verify an uploaded file is in fact a spreadsheet?

I have a tool which allows a user to upload a spreadsheet, and then I parse the spreadsheet with Laravel-Excel. My issue is, how can I check that the file is a valid excel file before attempting to parse it? I looked in the PHPOffice/Laravel-Excel…
chiliNUT
  • 18,989
  • 14
  • 66
  • 106
0
votes
1 answer

Laravel Excel - how to remove a row by row number?

I am using Laravel Excel package with Laravel 5.2. I've loaded an .xls file and can read cell values. Code: Excel::load($file, function($reader) { $sheet = $reader->getSheetByName('Sheet1'); echo 'value:…
Ariful Haque
  • 3,662
  • 5
  • 37
  • 59
0
votes
1 answer

How to pass all arrays into formArray maatwebsite-laravel-excel

im getting all the array what i need. but when i don't know how to pass all the arrayes $data = array('JOB NO','INVOICE NO','CUSTOMER','VAT(OUT PUT)','ACTUAL VAT'); foreach($jobs as $row){ $client…
Developer
  • 145
  • 2
  • 5
  • 20
0
votes
2 answers

Laravel Excel - Get Active Cell or Row

That's a simple question. I'm building a PHP Excel from scratch and is a very useful package. I need to catch the active cell or row to know which cells to modify and customize, I checked all methods in the package and I didn't found something that…
Deric Lima
  • 1,972
  • 2
  • 24
  • 33
0
votes
0 answers

Laravel-Excel throwing exception when download as .xls

I'm using maatwebsite/laravel-excel package to handle a very simple report generator. The following code is throwing an exception with the error 'Call to a member function setExtSheet() on null' in…
davidandrew
  • 183
  • 3
  • 15
0
votes
1 answer

Forcing Laravel 4.2 to auto-download exported sheet using Laravel-Excel

I am having a weird issue where I can't force Laravel to automatically download an exported sheet. I know that the sheet is being generated because after I click on the link (at the bottom) I am taken to a blank page -- if I hit refresh on that page…
0
votes
1 answer

PHPExcel how to detect if a loaded view used specific `fontAwesome` icon, and write that?

I'm using Laravel-Excel, When I load a view and parse that with DOMDocument then i write them to specific row and cell of table, now if on the view a column uses from fa-check-square-o icon, how i should detect that ? and how i should write that ? I…
jones
  • 1,423
  • 3
  • 35
  • 76
0
votes
1 answer

Access variable name from the previous loop when parsing CSV file

I am trying to parse a CSV file of user information. The CSV is formatted at such: userid,username,userlocation notecontent, notedate notecontent, notedate notecontent, notedate notecontent, notedate userid,username,userlocation notecontent,…
samiles
  • 3,768
  • 12
  • 44
  • 71
0
votes
0 answers

How we can create a table in excel as the below html?

Suppose I want to create a table with php-excel or laravel-excel that should has the following structure:
Column A Column B
value 1
jones
  • 1,423
  • 3
  • 35
  • 76
0
votes
0 answers

`laravel-excel` how to create a table inside a cell?

Suppose I have to write data a Microsoft Excel Workbook, I need to create a table with 5 rows and 4 columns, now in row 3 and column 4, I want to create a table with 3 column and 4 rows. Using laravel-excel how can I achieve this? I have created the…
jones
  • 1,423
  • 3
  • 35
  • 76
0
votes
1 answer

Laravel Excel not working in Laravel 5.2

I recently just got stuck with this problem. Exporting my database data to excel using Laravel Excel. I just copied the code on the tutorial links, but unfortunately it doesn't work on me. And I think I got everything setted up for laravel excel…
Eli
  • 1,256
  • 4
  • 29
  • 59
0
votes
1 answer

File not found error in Laravel Excel while importing file

I am using Laravel Excel in my Laravel 4.2 project. I tried to import simple xls file but I am getting error because of slashes. I am using windows development environment currently. I know this error will be gone if I will use linux development…
0
votes
1 answer

How to generate heading for columns?

i generate excel using Larvel-Excel this is my function `\Excel::create('JOBS', function($excel) { $excel->sheet('2015', function($sheet) { $jobs = \App\Job::all(); foreach($jobs as $row){ …