0

I want to use my PHPExcel Laravel application. I installed the library in the vendor directory. What is the method to call my controller and thereby implement this example: http://g-ernaelsten.developpez.com/tutoriels/excel2007/?page=fondements#L2.1 In the posts I read it just had to write to the header

use PHPExcel; use PHPExcel_IOFactory;

It's not sufficient

Who can help me start with this library? and integrate it into my project Laravel. Thank

cfor
  • 15
  • 1
  • 7

1 Answers1

1

Maatwebsite made a built a Laravel package for PHPExcel. You can find it here https://github.com/Maatwebsite/Laravel-Excel together with the documentation for it.

If for any reasons you prefer to not use this, you need to

include '/vendor/PHPExcel/PHPExcel';
include '/vendor/PHPExcel/PHPExcel/Writer/Excel5.php';
Daniel Enache
  • 391
  • 3
  • 5
  • Good idea ! But I prefried PHPExcel use the library because the examples are numerous and well detailed – cfor Nov 05 '16 at 15:35
  • It's the same library, it's just put together for easier use with Laravel. – Daniel Enache Nov 05 '16 at 15:37
  • If you are bent on using it without the wrapper for Laravel, you need to use include 'PHPExcel.php'; include 'PHPExcel/Writer/Excel5.php'; (prefixed with the actual path to your vendor folder) – Daniel Enache Nov 05 '16 at 15:39