Menu
  • HOME
  • TAGS

Laravel Excel/PHP Excel: Import, modify, download

php,excel,laravel,phpexcel,laravel-excel

Laravel-Excel runs off of PHPExcel, and you can run native PHPExcel methods on the objects exposed by Laravel-Excel. From the docs, to get the cell: http://www.maatwebsite.nl/laravel-excel/docs/export#cells \Excel::create('Document', function($excel) { $excel->sheet('Sheet', function($sheet) { $sheet->cell('A2', function($cell) { $cell->setValue('this is the cell value.'); }); }); })->download('xls'); And, here is a screenshot of the...

Row 2 is out of range (2 - 1) laravel-excel

php,laravel-5,phpexcel,phpexcelreader,laravel-excel

I think i'm getting too late to answer. Though author gets solved by deleting extra sheets. There is an option with package where you can select specific sheet to read. $result = Excel::selectSheets('Sheet1')->load('public/uploads/test.xlsx',function($reader){ })->get(); For more details check http://www.maatwebsite.nl/laravel-excel/docs/import for Selecting sheets and columns Hope this may Help !...

Copying Excel from Template xls

laravel,laravel-excel

Haven't tested it but try this: Excel::load('template.xls', function($excel) use($order) { // Writing stuff })->setFileName('new-filename')->store('xls', public_path('exports')); Note that you shouldn't need to specify an file extension...

Larvel CSV Import inserting with the same ID (Simple Import)

php,mysql,laravel-4,laravel-excel

Seems like you are using the same instance of a model over and over. Try changing fill(): $this->model->fill($data); with create(): $this->model->create($data); With fill() you are only filling the already created model instance with some data. But if you use create() you are first creating a new instance (with a new...

Ambiguous class resolution in laravel phpexcel update

php,excel,laravel,composer-php,laravel-excel

This actually has nothing to do with the package you are installing. Explanation When recreating the autoload files (composer dump-autoload) after the update Composer detected that you have two classes with the exact same name (but in different files). Class SettingsController in SettingsController.php and SettingsControllerBackup.php and class ClassModel in ClassModel.php...

Class 'App\Http\Controllers\Excel' not found in Laravel

php,laravel,namespaces,laravel-excel

Instead of Excel::create you should use \Excel::create or add at the beginning of your file after current namespace use Excel; and then you will be able to use Excel::create And the second error is that you used: 'Excel' => 'Maatwebsite\Excel\ExcelServiceProvider', and you should use: 'Excel' => 'Maatwebsite\Excel\Facades\Excel', instead according to...