• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
(01-09-2018, 08: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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.