Welcome Guest, Not a member yet? Register   Sign In
Unable to use library from composer
#1

Hello,

I have a problem with my composer library.
I just start to use composer so, I made the setup and I have in my Application folder the composer.json, the composer.lock, I installed the phpspreadsheet library. All the files are in the vendor folder.
Finally, I change my config.php with the autoload composer to TRUE.

I have always the same error :

Code:
Message: Class 'Spreadsheet' not found

What have I forgotten ?
Thanks fot the help.

François
Reply
#2

(This post was last modified: 01-09-2018, 11:11 AM by Paradinight.)

(01-09-2018, 07:47 AM)fwillemin Wrote: Hello,

I have a problem with my composer library.
I just start to use composer so, I made the setup and I have in my Application folder the composer.json, the composer.lock, I installed the phpspreadsheet library. All the files are in the vendor folder.
Finally, I change my config.php with the autoload composer to TRUE.

I have always the same error :

Code:
Message: Class 'Spreadsheet' not found

What have I forgotten ?
Thanks fot the help.

François

Did you add

Code:
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

in the head?

https://phpspreadsheet.readthedocs.io/en/develop/

edit:

is the vendor folder in the application folder?
Reply
#3

Hello,

I tried to set those lines in the function so it will not work...
I put them in the head and now it's ok.

Thanks for your help.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB